|
Thank you Harold!
I was able to get the method to do what I wanted it to, now I need to get it to write bytes ... I have A LOT to learn!!
|
|
|
|
|
If you're asking why the code does what it does, that answer can be found in the documentation for whatever chip this is driving.
Some parts of that code look rather strange, you might want to go back to the source (metaphorically speaking, not this source code!) and rewrite the protocol code yourself. It would be a good exercise in 'bit-twidding' in C#. Does this code actually work? It doesn't look like it should in a few places unless the underlying protocol is weird.
|
|
|
|
|
Hi,
I need code examples how show number of online users in my site application.
Thanks.
Rick
|
|
|
|
|
0) Count them
1) Display the count
But, personally, I wouldn't bother; I mean, look at the count for Code Project, it's pretty much pointless.
|
|
|
|
|
First of all you should have a flag field on your users table which determines which user are online. On my databases this field I name it as "logged" with the type of bit and then on the time when the user is logged to the application then this field will be updated to true and on the time when he is loged out then will be false. Since you have this flag on your users table it's very easy to know which users are online.
Regards
Qendro
|
|
|
|
|
Hi,
I have observableCollection which contains string types.
How do I sort it?
|
|
|
|
|
Look at this article[^]. It discusses three approaches.
The third option, the extension method option, is really the best one.
|
|
|
|
|
Do you really need to sort the collection itself or just view it as sorted without changing the underlying collection? If the first, follow the previous answers. If the second, then you can just expose an ICollectionView[^] and bind to that rather than to the root collection.
|
|
|
|
|
|
I would suggest you need to compile and link it into an exe. Exactly what problem are you having?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Why I use directx.capture save as wmv, I can not set to 640x480 wmv files
|
|
|
|
|
Does your video card support low resolutions?
You should be able to do it by using setDisplayMode .
e.g. ddraw.setDisplayMode (640, 480, 8, 0, 0);
|
|
|
|
|
hi frnds im doing a project and in a face of adding a forum in my project so is there anyone who can help me....with code or ideas regd forum in .net c#.....im new here and wish ur help and support dear friends........
|
|
|
|
|
If you want to add a forum feature I assume you're talking about web development and therefor this question would be more suitable in the ASP.NET forum.
On the other hand, your questions is not very specific so my advice is to do some reading/googling and when you're stuck on a more *real* problem - that is when you post something here.
Good luck.
|
|
|
|
|
People vote you down for following reasons:
- Please do not use text speech. it's annoying to read. Also use full sentences and try to correct spelling errors before posting. Not everybody is native English, but do give an effort.
- People will not give you code. They will only point you in the right direction if you have a well defined problem. It helps if you explain what you tried or what you searched for yourself. If you do post code, do so with smaller snippets.
- We don't dislike you, but we're not your friends.
- Don't expect people to put time into research and formulating an answer when you can't put time in asking the question.
hope this helps.
V.
|
|
|
|
|
If you are a beginner, I suggest you pick up a book on .Net development or C# and read.
|
|
|
|
|
Hello,
I built a plugin for a parent application on an x86 OS at work, and came home to try it and it would not work. I got the error code of "0x8007000B" when trying to load the dll which lead me to find out that because dll was set to build to anycpu there is some sort of conflict.
Does anyone have any idea as to how to fix this so that it always works, no matter the CPU architecture?
Here is a picture of the error:
http://img210.imageshack.us/img210/9088/pluginerror1.jpg[^]
|
|
|
|
|
There is no general solution, applicable to all applications. The fundamental rule is a process must be homogeneous, i.e. consist of all x86 or all x64 code; so e.g. you can't build a plug-in that works for both a 32-bit and a 64-bit native app (say Internet Explorer).
However, if app and plug-in are both managed code, then building for x86 should always work, as each x64 processor and Windows version (at this moment) is able to execute x86 code as well. One caveat: you need all referenced files on your machine, and that may be tricky in some situations.
Remark: Visual Studio Express doesn't let you choose, it generates "AnyCPU" (Google will yield some work-arounds though). Full Visual Studio lets you choose, unfortunately the default is "AnyCPU", which may cause your app to start as a 64-bit process, to later discover some needed native file isn't available for 64-bit (warning: on Win64, 64-bit system code resides in system32, and 32-bit code in systemWow64!).
|
|
|
|
|
Hi Luc,
Thanks for the reply.
With some further troubleshooting, I have discovered something interesting. I thought the problem was the plugin dll I had written, but it turns out it was actually a resource dll that was inside of my projects plugin dll. So the hierarchy is this:
Parent Application (exe)
-->My PlugIn dll (c sharp)
---->Resource dll (delphi)
I do not have any control over either the Parent Applications code or the resource dll. It looks as if when the Parent application and the plugin I wrote are ran as a 64bit application (on a 64bit OS) the resource dll will not load. Does this sound like a reasonable diagnosis? If so, is there a work around for this situation?
|
|
|
|
|
The main code decides on the word size of the process (either directly by being built for 32 or 64bit, or by looking at the OS when managed and "AnyCPU"); everything else must comply to the top-level code.
Hence, if resource.dll is 32-bit, it all must be 32-bit; there is no way around that.
if parent is managed and built for "AnyCPU", there are hacks to modify it and effectively become built for "x86" (the difference is a single bit in the exe's header!); you need "corflag" or similar, see e.g. http://stackoverflow.com/questions/1507268/force-x86-clr-on-any-cpu-net-assembly[^]
|
|
|
|
|
Thank you.
I will work with that tomorrow and try and get it working.
|
|
|
|
|
Hi Luc,
I ran corflags against my resource.dll and I got the following message
"corflags : error CF008 : The specified file does not have a valid managed header"
I know it was compiled in Delphi, but having no experience with Delphi and having not encountered this type of conflict before, I'm pretty confused on how to proceed?
|
|
|
|
|
no surprise here. Now re-read what I wrote earlier.
|
|
|
|
|
Ok, I see where you were going with it now.
Here are the results from the parent exe file
Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0
I forced it to 32bit and tried to start it, 8 other dependencies are failing, probably because they have the 32bit flag set to 0 so I shall scrap this idea unless there is a way to do something similiar on the unmanaged resource.dll .
Thank you for your help.
|
|
|
|