|
Hi all,
I've a 32 bit DLL that needs to register 2 other DLLs. One of these DLLs are 64 bit, and another is 32 bit. I know that I can simply load the DLL and call DllRegisterServer for the 32 bit DLL.
However, I am not sure how can I proceed with registering the 64 bit DLL. There are several ways like:
1. RegSvr32.exe [DLL name here]
2. RunDll32.exe [Dll name here] [DllRegisterServer]
and so on...
However, windows is forcing file system virtualisation upon my process since it's 32 bit, and the calls to the above executables are invoking the corresponding 32 bit versions (from within C:\Windows\SysWOW64), even if I hardcode the path to C:\Windows\System32 (where the 64 bit versions reside). And because the 32 bit versions of those applications are called, they fail to load my 64 bit DLL.
Is there a way to temporarily disable WOW from within my code, so that I can actually execute the 64 bit version of those applications? Or is there any other workaround?
Note: I do not want to build a 64 bit version of this particular DLL (the one which wants to do all the registration).
Any help will be appreciated. Thanks!
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
|
I don't have VS installed on this machine now to test it. However, I'm fairly sure that this should be a straight forward way of resolving my problem by bypassing the WOW mode!
Many thanks!
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
I also have realised that I could call SHGetFolderPath() by passing in the appropriate CSIDL (in my case, it is 32 bit process running in WOW mode on 64 bit windows):
CSIDL_SYSTEM to retrieve the 64 bit system32 folder
CSIDL_SYSTEMX86 to retrieve the WOW mode system32 folder Note that this applies only for a 64 bit operating system. If the OS is 32 bit, then both the above calls will return %windir%\System32 , because there's no WOW mode.
More information can be found in this MSDN page: http://msdn.microsoft.com/en-us/library/dd378457(v=VS.85).aspx[^]
With this way, I was able to execute both versions of regsvr32 without having to by pass the WOW file system redirection!
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
How can I check if a string is base64 encoded string?
|
|
|
|
|
Manually check whether the string contains only the characters (A-Z, a-z, , 0-9, + and /) that can be the output of Base64 encoding. Such a string can be successfully decoded.
|
|
|
|
|
|
1. Check if the length is an exact multiple of 4.
2. Try to decode it and catch any error.
|
|
|
|
|
|
Can't understand why someone downvoted this.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Is there already a function in Windows that can extract just the volume name from a fully qualified path?
For example:
C:\Path1\path2
should return
"C:\"
and
\\MyServer\MyShare\text.txt
should return
"\\MyServer\MyShare\"
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I found it:
GetVolumePathName()
Retrieves the volume mount point where the specified path is mounted.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
|
Wow. Another API I have never heard of.
How do you find this stuff?
|
|
|
|
|
|
I am experimenting with different releases of OpenCV and would like to document command line options.
Is there a simple way to see / print all command line options in use in MFC workspace ( Project _ Settings)?
Thanks for reading.
Vaclav
|
|
|
|
|
The simplest way is to go to Project | Settings | C/C++ and copy/paste the text box at the bottom of that tab, "Project Options". You could also probably find this info in the project .dsp file.
|
|
|
|
|
Thanks, it is in *.dsp file
|
|
|
|
|
Hi all,
i m using ListCtrl with Checkbox option.
i m popup a message on double click of list item and i want the message not pop up on double click on ckeck box of this item .
please tell me how can i do this.
thanks in advance.
|
|
|
|
|
The solution to this is the NM_DBLCLK notification message; for more info see here: http://msdn.microsoft.com/en-us/library/bb774867%28v=vs.85%29.aspx[^]
Here is a code snippet:
void MyDlg::OnDblClick(NMHDR* pNMHDR, LRESULT* pResult)
{
LPNMITEMACTIVATE pNMIA = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
int nItem = -1;
int nSubItem = -1;
if (pNMIA)
{
nItem = pNMIA->iItem;
nSubItem = pNMIA->iSubItem;
}
if (nItem >= 0 && nSubItem >= 0)
{
CString strText = m_List.GetItemText(nItem, nSubItem);
TRACE(_T("OnDblClick at (%d,%d): '%s'"), nItem, nSubItem, strText);
}
*pResult = 0;
}
The message map entry looks like:
ON_NOTIFY(NM_DBLCLK, IDC_LIST, OnDblClick)
This gives you the sub-item of the click, and from that you can tell whether the checkbox column was clicked.
|
|
|
|
|
i am asking how can skip to pop up the message box on double click on check box in list ctrl.
|
|
|
|
|
Le@rner wrote: i am asking how can skip to pop up the message box on double click on check box in list ctrl. And I just told you. Did you even try my code?
|
|
|
|
|
Hans Dietrich wrote: Le@rner wrote:
i am asking how can skip to pop up the message box on double click on check box in list ctrl.
And I just told you. Did you even try my code?
yes here message popu on double click of checkbox also
|
|
|
|
|
You can look at ptAction in NMITEMACTIVATE .
|
|
|
|