|
What I/O model does the process utilize?
Kuphryn
|
|
|
|
|
have a look a the select() function to make any blocking function at a normal time get non-blocking...
in fact, that is a function i use under linux, but it must have an equivalent for Windows programmers if it is not the same.
TOXCCT >>> GEII power
|
|
|
|
|
select() and ioctlsocket() are what I needed. Thanks.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Either select() or I/O completion ports.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
You can also use ioctlsocket with the FIONBIO option to change your blocking socket into a non-blocking socket. If an operation would normally block, the call instead returns WSAEWOULDBLOCK .
The Winsock Programmer's FAQ[^] is a useful resource.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Yes, that is what I ended up using. Thanks.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I wish to use MSXML2 in my application so I can look at some RSS feeds. I am using Visual C++ 6.0.
I have seen some example code but it mostly is C# but there is some code in one article on CP that has its code written in C++.
One line of code is like this:
::IXMLDOMNode *pNode = NULL;
When I add this code, I get a compile error. Must I download the latest SDK or something else?
Any help is much appreciated
|
|
|
|
|
You need to import the MSXML type library in your stdafx.h.
e.g.
#import <msxml14.dll> named_guids
That will at least get it to compile
Try here[^] and here[^] as a good source of information on learning XML technologies.
"Oh, I'm sick of doing Japanese stuff! In jail we had to be in this dumb kabuki play about the 47 Ronin, and I wanted to be Oshi, but they made me Ori!"
|
|
|
|
|
Don't. Use expat, there is an article here on CodeProject that details exactly how to use it.
Sometimes I feel like I'm a USB printer in a parallel universe.
|
|
|
|
|
I'm writing a screen saver which will, from time to time, swap out and display different images. Currently it just repaints the new image - no problem. What I'd like to do is add some simple transition effects like fading from one image to another. I done some looking around to find out how to do this but have had no luck. I guess I can't get the right search keywords. Anyway, can someone point me in a direction of sample code or a free-but-good library (I prefer sample code)?
Thanks,
Randy
Randy
|
|
|
|
|
Sorry...more info....
Visual C++ and MFC
Randy
|
|
|
|
|
Search for CxImage here in codeproject may be that would help you someway.;)
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Hello All,
I am trying to run a basic genetic algorithm program.I am able to compile the program for a GA 1D Array but when i execute i am getting the following erros.
error LNK2001: unresolved external symbol _WinMain@16
Debug/GA1DArra.exe : fatal error LNK1120: 1 unresolved externals.
I am a novice at programming and am basically stuck and am not able to proceed further. Please help me out if you could.
Thanks in advance.
Ramya
Ramya
|
|
|
|
|
Ramya, it seems you are trying to write a console application with windows-based programs' project settings.
ie,try Project -> Settings -> Link
and on the bottom box search for "/Subsystem:windows" and change it to
"/subsystem:console".
Im not sure tats the only one to be changed...
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
What kind of project have you selected?
or lookup for LNK2001 in the msdn. it would offer you some help and some additional knowledge to tackle this kind of problem.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Ramya Narayanaswamy wrote:
error LNK2001: unresolved external symbol _WinMain@16
See here.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Iam currently trying to write some file IO in visual c++ for a project iam on and I need to transport some number data (Integer & double) written in visual basic and then saved to a file. This data then needs to be read in by my visual c++ app. The problem iam having is that if I save the data as ascii text in VB then it is hard for VC to read the text in and put them into their correct types (ints & doubles).
I was considering using binary IO to write the data to file but iam unsure if a 16 bit integer or double would have the same representation in binary as it would in visual c++
Ideas anyone?
[] /\ () X
|
|
|
|
|
If you are planning on transporting the binary representation of these numbers across these development platform, not only will you need to ensure the correct binary format stored, but this still will not solve your problem of distinguishing between the integer and float (double) type.
I would suggest storing the numbers as a text value. You could then use a decimal digit to distinguish between wether your number should be treated as an integer or a float: eg:
If the following is stored in your text file:
"45,23,45.0,23.0"
Then you would infer that the first two numbers should be of type int, and the last two, of type double.
I Dream of Absolute Zero
|
|
|
|
|
I have an application that runs on our server that I can no longer get support for.
The application runs great for days at a time and then it crashes.
I would like to write a task manager type utility that would automatically cancel the application.
Can you point me in the right direction? C++ or C# code highly desired.
thanks
|
|
|
|
|
McGahanFL wrote:
I would like to write a task manager type utility that would automatically cancel the application
what is the need for closing the appliation by using an external program?
you can do that when your application crashes..use the try(){ } catch(..) in every method, then you can catch the exceptions when application carshes. in the catch(), just do whatever you want to do..just terminate your threads or kill your application itself..or even invoke an instance of your application etc..
The returned pointer may be temporary and should not be stored for later use.
|
|
|
|
|
Thanks for your reply. As I indicated, I do not own the program and therefore do not have the source. The vendor no longer seems to be in business.
Anyway, I found a regerstry setting.
thanks
|
|
|
|
|
If the application has crashed, what would be left to cancel?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
The system presents the admin with a doctor watson msgbox.
I got my answer, thanks
|
|
|
|
|
I have written a DLL which hooks different application on their thread
id.
Once the events are trapped in the dll , then the functions are
written separately to process the hooking in the dll.
But through out the dll , I have defined a static counter variable.
This is supposed to get modified in each of the trapping functions.
But it seems that the variable is not getting modified .
I need to pass the modified value to some other application using a
third function in the dll.
What should I do to ensure that the common variable is updatable from
all the Hook-processing functions
Thanks in anticipation
Rajesh
|
|
|
|
|
Place your static in a data segment like this.
#pragma data_seg (".StaticShare")
static unsigned int counter = 0;
#pragma data_seg ()
This assure that this variable will be available for all instance of your dll. You will have multi copy of your dll but only one data_seg (StaticShare).
P.S. you can name your data_seg the name you want.
Bye.
|
|
|
|