|
Commercial licenses are available on request. - you have to pay for the potent version!
[edit]Bah. I missed "free" in the original requrest. [/edit]
--
Presented in BC [Brain Control] where available
|
|
|
|
|
|
At first, thanks for all replies. Nevertheless, i need a zip-decompression which i use without windows.h and wchar.h. There is only a limited libary availible (for Nintendo DS). Exists any chance to get sourcecode from a project, which IN-Buffer is a char* and as OUT-Buffer is a Struct or something else which i can handle with my own I/O to write it to my FS. The reason why i want to handle a ZIP-File is that i want to modfie the date under Windows.
|
|
|
|
|
Hi All,
I have some queries regarding font.
Q1. What is exactly a 'Bitmap Type Font', 'TrueType Font'?
Q2. Difference between the two.
Q3. Difference between 16-bit version and 32- version of a Font?
q4. How can we identity whether a font is 16-bit version or 32-bit?
Anwsers to any of the above will be great help for me.
Thanks in advance
Suraj
Suraj Gupta
|
|
|
|
|
|
How can i make a driver hyperthreading ....
i doent mean the single HT core but i need my driver working on a multi core
HT . Is it possible or not?
vineesh
|
|
|
|
|
How can I programmatically get the group(s) that the current user(the user account the applications is running on) is in? I can get the privileges, but i need the group(s). Thanks for any help.
--yeti
|
|
|
|
|
EpicYeti wrote: How can I programmatically get the group(s) that the current user(the user account the applications is running on) is in?
NetUserGetGroups() comes to mind. If you want local groups, use NetUserGetLocalGroups() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
|
Hi all,
I have a loop in my program, that is waiting for a client to connect via TCP/IP for example:
But the thing is, the application uses the cpu to the max (waiting for a client(s)).
<br />
printf("Waiting for client (press any key to abort)...\n");<br />
while(1)<br />
{<br />
if(kbhit())<br />
{<br />
exit(1);<br />
break;<br />
}<br />
....
}<br />
My question is, is there another way of running a loop so that it will use less cpu uasge?
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Yeah, put Sleep(500) or something in somewhere, so it loops, takes a little rest, loops again, takes a little rest... and so on
|
|
|
|
|
Thank you for the help, I'll try it...
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
As a side note, using Sleep calls generally indicates a poor design and should be avoided.
What you really want is to receive an event when a client tries to connect. In which case, you would use one of the WaitForXXX methods (e.g. WaitForSingleObject, WaitForMultipleObjects).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi Zac,
Thank you for the reply, I'll check those two methods out (WaitForSingleObject, WaitForMultipleObjects).
With these methods, can I still put all my code in the loop that one of these methods creates for example:
<br />
WaitForSingleObject(hHandle,INFINITE)<br />
{<br />
....
}<br />
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
« Programm3r » wrote: With these methods, can I still put all my code in the loop that one of these methods creates for example:
WaitForSingleObject(hHandle,INFINITE)
{
.... // rest of all the code to execute then a client(s) connects
}
It would depend on what you were doing (i.e. if you were waiting for multiple clients to connect before moving on, or were simply spawning a thread for each connection, yes).
As a rule of thumb, try to avoid using INFINITE as your timeout value. The reasoning is simple: if the event never occurs, the thread you are in is deadlocked. Generally, choose an appropriate timeout value and check the return value of WaitForXXX to see if it returned the timeout value (OBJECT_TIMEOUT if memory serves).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
You can pass as many handles as you want (and as resources call allow for) to the WaitForMultipleObjects method. You can set the flag to either wait for 1 or more, or wait for all before the function returns, depending on what you want (though, I suspect with many objects, you will want to know if any 1 of them has triggered since the liklihood of all of them triggering isn't very high).
You should also note that with network communications (which is what I think you are using it for?) you only really need 1 HANDLE (just an event saying that an incoming connection is being requested). When you handle that event (presumably by spawning a thread to handle the connection), you can reset the event to non-signaled state and resume waiting for connections.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
What about
printf("Waiting for client (press any key to abort)...\n");<br />
getch();<br />
exit(1);<br />
break;<br />
}<br />
....
}
|
|
|
|
|
First of all, thank you for your reply,
This might sound stupid, but the example you provided, performs the same action as the kbhit()??? or and I missing something??
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
« Programm3r » wrote: but the example you provided, performs the same action as the kbhit()???
Yes except it waits for a key press consuming no noticeable CPU time.
|
|
|
|
|
Thanks Mark ... I understand ....
I'll try it...
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
« Programm3r » wrote: My question is, is there another way of running...so that it will use less cpu uasge?
Have you considered completion ports or events?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanx for the reply David...
Thought about it, but I have put so much work into this project, I think it would kill me to do it over (that is if the "..completion ports or events?.." requires major Surgery to my app )
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
David, just between you and me .... the completion ports code / functions looks very difficult ... Got this sample code from Windows Sockets 2.0 Write Scalable Winsock Apps Using Completion Ports .... and I didn't understand a dame thing lol .... But thanks for the input, I sure that I can learn something out of this....
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|