|
what about this :
pFunc = (FACTORY)GetProcAddress(hmodule,"<code>_Factory</code>");
BTW, your code is not very secure, as you don't test hmodule before using it...
|
|
|
|
|
Where is the rest of the Factory() function, could be an allocation error.
|
|
|
|
|
Hi all, thanks for your answers.
The problem was that i declared a function in the interface as an int, but the implementing class declared the same function with an enum.
So when calling the function from the dll (which was the implementing class) the function was not found and another function was called.
______________
|Interface |
|-x(int var);|
--------------
|
\/
______________
|dll class |
|-x(enum var)|
--------------
|
|
|
|
|
Hi...Iam running MFC application .it is possible .exe file cannot shown in process manager....plz help...
|
|
|
|
|
I am not sure anyone here or anywhere else will help you. Can you give a good reason to want to do this? The implications of such a request is for nefarious purposes only. Unless you have a really good reason to want to do this, please post it, and then you might get help.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi..because iam running NT service..For running NT service i called for this exe path..after that creating the service..after started the service.. when i started the service at that time one more exe is running in process manager...but i need only one ..
|
|
|
|
|
tns_ranjith wrote: but i need only one ..
Well, that has nothing to do with hiding it from the task manager. Take a look at this article[^] for instance.
Ans please, make an effort when you write because the only thing I understood from your post was that you want only one instance of your app, the rest was completely obscure to me.
|
|
|
|
|
IF you want tto hide your process of TaskManager or other programs my experience is no,you cant.
|
|
|
|
|
First, you cannot do something like that. Second, we do not support people to build applications of that kind.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Hi all,
I have this snippet:
TCHAR buff[1024] = {_T('\0')};
_tcscat(buff, _T("This is a test"));
UINT ii = 0;
ii = strlen(buff);
I get the error :
error C2664: 'strlen' : cannot convert parameter 1 from 'TCHAR [1024]' to 'const char *'
Now I am wondering why this compiles fine with the project i copied this snippet from.
If i use reinterpret cast the strlen only returns 1
Please advise
Thanks,
Jayjay
|
|
|
|
|
monsieur_jj wrote: ii = strlen(buff);
I guess in your project, UNICODE is defined and strlen() is not unicode compatible. Since your string is TCHAR array, you should use _tcslen() .
monsieur_jj wrote: Now I am wondering why this compiles fine with the project i copied this snippet from.
In that project UNICODE might not be defined.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
You have to use the unicode routine instead: _tcslen. I suggest this excelent article[^] if you want to understand things properly. It is a must read for each C++ developper.
|
|
|
|
|
How is it that you knew TCHAR required _T() and _tcscat() , but still tried to use strlen() ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
For this, I had to click on the link "Good Question" !!! lol
|
|
|
|
|
I have a ListCtrl to display thumbnail image list, I want to change color of the border of selected item in this ListCtrl but I don't (with SetOutlineColor). Please help me
|
|
|
|
|
Did you try with NM_CUSTOMDRAW?
|
|
|
|
|
Hi all,
If the .chm file is open and appilaction is terminated than the .chm is not close.
Please anyone can tell me how can i close the .chm file when application is terminated.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Use the HtmlHelp function instead of ShellExecute, it takes care of that.
Really, I just checked in one of my apps that uses HtmlHelp function, and the help does in fact close when the app is terminated. I assume that you're using the code I posted?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
No problem.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hello friends,
How can the program findout which OS is installed?
I want to get the name of the OS which runs in current PC.
Any API or sample code would be appreciated.
Thanks in Advance.
ritz1234
|
|
|
|
|
|
Try GetVersionEx .
Regards,
Paresh.
|
|
|
|
|
|
I am passing a structure as a parameter to a Thread, but with in the structure I should send a couple members as refrences. but I want to inilise it lager on bufore the thread function.
typedef struct THREADSTRUCT_SCOPE
{
// constructor.
THREADSTRUCT_SCOPE( const Scope* ptr )
: _this( ptr )
{}
Class A &a; //want to pass it as reference, Inilize it before entering Thread
Class B &b; // - do -
const Scope *_this;
}THREADSTRUCT_SCOPE;
|
|
|
|