|
hint_54 wrote: Then if I use only one of them its the same thing, right?
Dan has answered your query.
hint_54 wrote: PS: what does AFAIK mean??
As Far As I Know.
Nibu thomas
Software Developer
|
|
|
|
|
from cplusplus.com[^]
The pragma directive is used to specify diverse options to the compiler. These options are specific for the platform and the compiler you use. Consult the manual or the reference of your compiler for more information on the possible parameters that you can define with #pragma.
If the compiler does not support a specific argument for #pragma, it is ignored - no error is generated.
#pragma once is supported by many but not all compilers. If you want to write code that works with a number of compilers, you should use the old fasioned #define... method.
Regards,
Dan
Remember kids, we're trained professionals. Don't try this at home!
|
|
|
|
|
How to call web service in vc++6.0.The Web service is written by vc++.net(ATL).Please give me an example code.I know that how to call it in Vc++.net,but the same as in Vc++6.0? I don`t want to finish it with soap.
Sorry,my English is not good.
|
|
|
|
|
It is still using SOAP,in fact I believe web service (regardless of Java or any other platform) are using SOAP protocol as foundation which you can't escape from it.
Anyway, you can try this
http://www.codeproject.com/webservices/SoapClient_CPP.asp
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I know the exam you given to me.But i don`t want to use this method.
Cam you give me another method (not using soaptoolkit)?
|
|
|
|
|
You could probably try to write yourself a simple SOAP client using WinSock or probably could try to use WinInet to do it. How about to search for another SOAP SDK? (which most probably not free like this one
http://www.sqldata.com/soapclient/usingSoap.htm[^])
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
how can you determine if a certain process is a system process
in kernel mode?
the _ETHREAD structure has a field called SystemThread. I guest that if that field is TRUE then the certain thread is a system thread and if a process has all thread with than SystemThread set to true are system processes. I gues I was wrong. i tested that on the process called "sytem" and it had'n all threads system threads even though it is system process.
there must be a way. how does the taskmanager do it ?
and another thing how can you enumerate all threads of a process in kernel mode. Is there a way to get them from the _EPROCESS structure ?
gabby
|
|
|
|
|
Hi euacela
I saw your answer in example's MSDN that enumerate threads of a process and detail process's
|
|
|
|
|
I have a MFC dialog box program, and all it is does is ping other computers and display the results. Right now I'm calling my function to ping from the OnInitDialog function. Therefore this executes the ping function before the dialog box pops-up causing a delay for the dialog to show up. Is there anyway I can pop-up the dialog box first, and then automatically call my ping function (without having to hit any buttons)?
Thanks
|
|
|
|
|
Make a button handler for the ping operation and then post your dialog a message to itself simulating the button click. That would do it. Or create and process your own registered message - post it to yourself from the OnInitDialog.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Thanks, PostMessage is what I needed.
|
|
|
|
|
Hi,
I am stuck up in the middle of killing a process created using CreateProcess within a DLL. While using ExitProcess with the crated process's exitcode, it is terminating the parent process too. Is there anyway to kill a process created within a DLL without disturbing the parent process?? . BTW the process that is craeted is an exe file of a console application.
thanks,
-Pav.
Got it, nevermind by using terminate process with process handle that was created
-- modified at 18:06 Wednesday 5th April, 2006
|
|
|
|
|
well
you should do it with terminate process
but when opening the process and obtaining the handle you should open it without inheritting from parrent.
OpenProcess(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwProcessId
);
DediredAccess should be PROCESS_TERMINATE
and bInheritHandle should be FALSE
Then terminateprocess should do the job easily;
gabby
|
|
|
|
|
OpenProcess hmmm... will give it a try sometime... Thanks for your time though..
-Pav
|
|
|
|
|
Although the practice is rampart - in general it is not safe to go around calling TerminateProcess on processes. This API kills the process on the spot and as such the application doesn't have a chance to clean up after itself. For example it may result in temporary files not being deleted, files or registry entries in a corrupt state as a result of the process being terminated in the middle of an update or worse.
Steve
|
|
|
|
|
Yep, you are right. But, depending upon the application I think we can go in this way to get around the problem. But in intensive applications this is not something that is recommended as you said. But, for me, this is good enough as I am using to start and stop NI-Board.
-Pav
|
|
|
|
|
|
Hi All,
I need help with the list boxes.I am working with Dlls.
Okay so what I want to do is: I created a list box with some items in it.
For example: FDK01, FDK02...FDK09 means key F1, F2.....F9. Now, I want to perform something like when I select FDK01 in the list box and then say OK ..it should then allow me to pressed button 1. How should I code the list box item to perform what I want?
Thanks in advance
C++Prog
|
|
|
|
|
Though it's not very clear from ur question but, I guess whenever a list box item is selected & user presses Ok button u want some other button to be selected. is it??
u can use SetFocus method for that
|
|
|
|
|
Preeti9 wrote: I created a list box with some items in it.
For example: FDK01, FDK02...FDK09 means key F1, F2.....F9. Now, I want to perform something like when I select FDK01 in the list box and then say OK ..it should then allow me to pressed button 1. How should I code the list box item to perform what I want?
You can use SendInput for this purpose.
Nibu thomas
Software Developer
|
|
|
|
|
I'm trying to write a program that takes input and instantly sends it to multiple windows simultaneously. Ultimate goal is to have 5 copies of Notepad open, typing into one, and the program fills out all 5 Notepad windows without ever changing focus from the initial window.
Unfortunately, I dont understand how to accomplish this because everything I read tells me that you must activate an application beforing using SendKeys or SendInput.
Anyone have some ideas? Has this been done before?
|
|
|
|
|
Send WM_KEYDOWN, WM_CHAR and WM_KEYUP messages (in that order) directly to the notepad windows. You don't need to emulate a keyboard - just tell them that a key has been pressed.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi I'm currently trying to code a REAL-TIME midi remapper program in Visual C++ using MFC..
I need the program to constantly look for a input midi signal... The only way I have figured out how to do this is to run a constant loop that contains the midipoll(); I've had to set it to only recieve a certain number of signals so it will eventually end.
I works great and recieves all of the messages.. but while in this loop I loose control of the rest of the program... The loop takes over. Is their a way I can do this without loosing control of the program?
|
|
|
|
|
Put that processing into a secondary thread.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Thanks.. that worked out great using a work thread...
Now i'm having a problem accessing the UI from within the thread.. ie. a listbox
I need to send info to the listbox from within the thread.. Any Ideas
this is what I got...
UINT MyThread( LPVOID pParam ); //prototye
UINT MyThread( LPVOID pParam )
{
while(RunThread) {
If (inputdetected){
m_ListBox1.Additem("input detected"); // <-- I don't have access to ListBox 1 from withing this thread.
}
}
return 0; // thread completed successfully
}
I call the thread to start with..
AfxBeginThread(MyThread, NULL);
-- modified at 15:50 Thursday 6th April, 2006
|
|
|
|