|
It might help if you showed some code and said where the file is located.
|
|
|
|
|
CString strPath = "C:\\Test\\SampleResource.dll";
CFileFind Ff;
bool bIsFilePresent = Ff.FindFile(strPath); // It returns true
HINSTANCE hTest = LoadLibrary(strPath); // It returns NULL
DWORD dwError = GetLastError();// It returns 126
I hope this piece of code is understandable.
Thanks.
|
|
|
|
|
The problem is most likely that the DLLMain() function in the DLL is returning FALSE.
When you build the resource DLL, set the "Entry Point" property to None - Resource DLL.
That ought to fix it.
The "Entry Point" property is on the "Linker" tab.
|
|
|
|
|
Entry point has been very correctly set and in fact it is working fine with WinXP and Win Vista. But same code is failing with Windows 7.
Any idea about it?
|
|
|
|
|
i want to display icon or bitmap on popup menu, as
ICON/BITMAP-->SOme text like this.
also i want to show tooltip when cursur is moved over popup menu.
thank you vm in advance
|
|
|
|
|
Did you look at Menus[^] section of CP.
Also CP has very good articles for tool tips.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
|
Hi all,
What is the use of declaring a private destructor?
Where we are using this? Can anybody tell an example
Thanks
San
|
|
|
|
|
The purpose of the private destructor is to avoid the deletion of the object while it is still referenced
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Could please send me some sample code
|
|
|
|
|
and other use could be if you want to stop the creation of the object on stack. Yes, you can not delete these object by using delete. Either you have to assume that you don't want to delete such objects or you have to overload the delete or delete these from any friend function.
class Test
{
public:
Test(){}
private:
~Test(){}
};
int _tmain(int argc, _TCHAR* argv[])
{
//Test tmp; // Compilation error;
Test *testP = new Test(); // work fine
return 0;
}
Manish Agarwal
manish.k.agarwal @ gmail DOT com
|
|
|
|
|
Test *testP = new Test();
what about delete?
|
|
|
|
|
for delete we have to create a friend function or we have to assume that we don't want to delete this
Manish Agarwal
manish.k.agarwal @ gmail DOT com
|
|
|
|
|
HI Manish,
How to write Friend Function to call Delete on Private Destructor.
Thanks,
Krishna.
|
|
|
|
|
here is a minimal example
class A
{
private:
~A(){};
public:
A(){};
friend void fn();
};
void fn()
{
A a;
}
In this case if you create a object of class A on stack in any other function other than fn() complier will give you an error C2248: 'A::~A ' : cannot access private member declared in class 'A '
Manish Agarwal
manish.k.agarwal @ gmail DOT com
|
|
|
|
|
Hi,
i am currently develop the CSP for Windows Vista platform.
i find out from internet that i need to replace advapi32.dll file in the system32. i already changed it and managed to replace the dll.
but, i still get an error when i run in the cmd prompt:
c:\windows\system32\regsvr32 mimoscsp.dll
the error that i got was :
the module "mimoscsp.dll" was loaded but the call to DllRegisterServer failed with error code 0x8009006
when i try to run the test program, i got an error at the function:
CryptAcquireContext returned error-57
anyone knows about it?
thanks
|
|
|
|
|
Error code 0x80090006 means "Invalid Signature"
Did you forget to sign the dll?
Test Signing the CSP[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Hi David,
Thank you for the reply.
My question:
Do i need to sign it first? Coz I'm not finalize the code yet. As what I understand, in XP, i just need to replace the advapi32.dll to the c:\Windows\system32 directory. (the advapi32.dll for win XP).
i did the same for vista.. i change the offset value (refer to the website) and reboot the computer. But i still get the same error.
am i doing the wrong thing here?
|
|
|
|
|
izyani wrote: Do i need to sign it first?
There are several unsupported methods of modifying advapi32.dll floating around the internet, some of which allow self-signed CSP and others allow unsigned CSP. I have no way of knowing what modifications you have made to the system DLL. The error code your recieving 0x80090006 implies that advapi32.dll is checking the signature.
|
|
|
|
|
Hi Randor,
FYI, I already changed the advapi32.dll with this value:
* Windows 2008 and Windows Vista SP1 : advapi32 version = 6.0.6001.18000
o At offset 0x2420C : change 75 to 90
o At offset 0x2420D : change 0C to 90
o At offset 0x24214 : change 0F to 90
o At offset 0x24215 : change 84 to E9
Refer to the instruction, i need to replace the file at:
a)C:\windows\system32
b)C:\Windows\winsxs\x86_microsoft-windows-advapi32_31bf3856ad364e35_
6.0.6001.18000_none_e34851aa8681b8b0
c)rename the patched advapi32.dll file to x86_microsoft-windows-advapi32_31bf3856ad364e35_
6.0.6001.18000_none_e34851aa8681b8b0
_advapi32.dll_9512793c and then put it in "C:\Windows\winsxs\Backup", thus overwriting the existing one.
I already restart and my machine after replaced the file. I tried to run the cmd :
c:\windows\system32\regsvr32 mimoscsp.dll and
c:\windows\system32\regsvr32.exe mimoscsp.dll
but i still get the same error - the module "mimoscsp.dll" was loaded but the call to DllRegisterServer failed with error code 0x8009006.
|
|
|
|
|
Hi,
During the development, I already run the cmd:
c:\windows\system32\cspSign c xxxx.dll
c:\windows\system32\regsvr32 xxxx.dll
success..
when i run the test program, i got this error msg:
Calling CryptAcquireContext - CryptAcquireContext returned error 57
Calling CryptGetUserKey AT_KEYEXCHANGE - ERROR_INVALID_PARAMETER.
Calling CryptGetUserKey AT_SIGNATURE - ERROR_INVALID_PARAMETER.
Done
|
|
|
|
|
i wish to find a program source code for the following fft ,dft, idft
and linear and circular convulution. please if anyone can help me out.
kamal jit sharma
|
|
|
|
|
Whenever I'm after some code that implements a particular algorithm, I typically find myself performing searches for the code I want. It is my most common experience that just asking a question on a forum takes longer than it takes to find the code. When you also allow time for the response to your forum question, it is orders of magnitude slower to ask on a forum than it is to search for code yourself.
And yes, I have done just this for some of the algorithms you mention.
Good luck.
Simon
|
|
|
|
|
Do you know about Google? Shhhhhhhhhhh it's a secret.
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]
|
|
|
|
|
I have an example of for loop like
for( int I = 0; I < 100; i++)
{
If (condition)
{
Method1. Write ‘break’ here or
Method2. I = 100 (make I equal to 100)
}
}
Which method is efficient to use? Why?
Thanx
|
|
|
|