|
I believe you need to pass the HMODULE for the dll, not the exe, which is what GetModuleHandle(NULL) returns. Use something like GetModuleHandle("nameofdll.dll").
|
|
|
|
|
yes, thank you very much it has resolved!
i thought since the function resides inside dll it will get the handle of the dll. i spent a few days troubleshooting this problem, thank you very much!
|
|
|
|
|
Hi all,
I have to create a win 32 dll which is loaded by two different processes. MSDN tells me that the dll is mapped to the process space of the calling exe and so there would be two instances of the dll running. The problem is that the dll which I have to create keeps doing some processing on a hardware board. Does it mean that both instances of my dll will keep on doing these operations parallely on the board? If this is the case then I need to make sure only one instance of the dll runs on the system, no matter how many processes load it. Any pointers in this direction and how to create a single shared instance of dll will be very helpful.
|
|
|
|
|
|
We see the very common MFC as shared dll option in our projects. Does this option mean than only one instance of the MFC dll would be running on the system? What happens behind when create a MFC shared dll?Can I use the same technique to create a shared dll?
Thanks in advance. Your responses are truly appreciated..
|
|
|
|
|
misha_grewal wrote: Does this option mean than only one instance of the MFC dll would be running on the system? What happens behind when create a MFC shared dll
Yes there be only one Instance loaded in memory, and every function has it address, using which we can make the call to the function!.
misha_grewal wrote: What happens behind when create a MFC shared dll
there is lot of difference between shared MFC DLL and Dll you are creating... actually your problem is syncronization not sharing... actually here Shared mean that Application will use MFC dll previously loaded OS.. and BTW I believe MFC dll itself use Syncronization technique like Mutex,events etc
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I use LoadLibrary( "ntdll.dll" ) to hide process!
just like :
hNtDLL = LoadLibrary( "ntdll.dll" );
RtlInitUnicodeString =
(CProcessHide::RTLINITUNICODESTRING)GetProcAddress( hNtDLL, "RtlInitUnicodeString");
ZwOpenSection = (CProcessHide::ZWOPENSECTION)GetProcAddress( hNtDLL, "ZwOpenSection");
.............
but in window 2000 pro :
1,some compuctors can start up and hide process;
2,some compuctors can start up but can't hide process;
3,some compuctors can't start up the exe. Show Error like this: "now Creating Error Log!"
if I Setup vc6.0 in the compuctors which can't Start up the exe.
the exe can Start up ,and Hide process!
why?
how to fix it ?
thanks
braden
-- modified at 3:00 Monday 19th December, 2005
|
|
|
|
|
|
i am working on one problem, in which i have to keep track on no. of message in a queue in a particular window. but there is no any such api availble which tell me what is current size of message queue.
so could anybody please help me to find out the size of the message queue in a win32?
Akshay Shingrup
|
|
|
|
|
Hi every body,
I have a Matlab toolbox use to extracing & matching fingerprint ( you can down load on the Mathworks.com with the key work : "fingerprint toolbox" ), then I used MATLAB COM builder to build a component. But, I don't know how to use it in VC++ 6.0 ?
Any body can help me ?
Please share ...
thanks a lot
Quang Dien
|
|
|
|
|
How can I get rid of "Ok Cancel and the rest of the buttons" on a property sheet.
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
-- modified at 0:29 Monday 19th December, 2005
|
|
|
|
|
This article[^] will help you.
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
Thanks.
I did try with ID_CANCEL but failed. Missed out on IDCANCEL.
lol
Rajesh R. Subramanian wrote: You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
Nice quote
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hello all
Very simple / silly question, sorry.
In MFC SDI Application, how to set status bar / pane message from document class and view class?
Thanks for your time
Ravi
-- modified at 23:35 Sunday 18th December, 2005
|
|
|
|
|
Hi,
A simple way. Make m_wndStatusBar public in CMainFrame class.
Include "MainFrm.h" in YourView.cpp and/or YourDoc.cpp.
Type the following to change the text of the pane at 0 index:
<br />
CMainFrame *pFrame = (CMainFrame *) AfxGetMainWnd();<br />
pFrame->m_wndStatusBar.SetPaneText(0, "New Text");
If you want more flexibility, you need to change/or manipulate also with
a static array 'indicators' in MainFrm.h file, which sets the panes in the status bar.
--
======
Arman
|
|
|
|
|
Could somebody have a such kind of sample code.
I would like to implement it as downloading a video file from the HTTP Server,
and when you are downloading you wouldn't wait for completing it; instead, you
could watch it during downloading processing.
If someone could give me a sample code, or some reference websites.
Appreciate more, and thanks a million.
ACMTino
|
|
|
|
|
this was one of my friends final year project,
will check out if he has set if free on the web
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Thanks for your reply, and where to find your friend's project
Could you do me a favor.
Thanks a lot.
ACMTino
|
|
|
|
|
I want to create a window using a dialog template without use DialogBox function. Is it possible? I'm not creating a MFC application.
I want to do it because I don't want to use 2 functions to control my application like WndProc and MyWindow function to receive the messages.
[www.bispenho.com]
|
|
|
|
|
bispenho wrote: Is it possible?
No
bispenho wrote: I don't want to use 2 functions to control my application like WndProc
Every windows app must have a WndProc function.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
|
SetDlgItemText(m_hWnd, nID, ...
SetDlgItemText(GetSafeHwnd(), nID, ...
SetDlgItemText(*this, nID, ...
SetDlgItemText(nID, ...
The last one is CDialog's (actually CWnd's) wrapper for SetDlgItemText.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hmm? None worked...
SetDlgItemText(m_hWnd, nID, ...
m_hWnd doesn't exist...
SetDlgItemText(GetSafeHwnd(), nID, ...
GetSafeHwnd() neither... I looked it up and it came out to be a member of CWnd, but it's not static...
SetDlgItemText(*this, nID, ...
error C2664: 'SetDlgItemTextA' : cannot convert parameter 1 from 'CMazzeeMapGrouperApp' to 'HWND'
SetDlgItemText(nID, ...
Doesn't exist either...
Do you know of another way? Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
|
I have an app which always runs in the background (main window is hidden) and it's only visible cue to the user is an animated icon on the task bar. The icon is animated when the app is actively polling for information, and static when the app is running but no polling is taking place. Now according to the task manager my app is running the CPU at about 20% just to animate the icon. This is not so bad when the user is sitting at the computer but the app is designed to run 24/7 so I would really like to be able to stop the animated icon when the user is not there to see it (screen saver starting and or monitor turning off) and start it again when the user is there (screen saver stops and/or monitor turns on).
Is there a way to detect the screen saver starting and stopping or the monitor turning off and on from an app that is not the currently active app? WM_SYSCOMMAND with SC_SCREENSAVE is only recognized by the active app when the screen saver starts, not when it stops.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|