problem when using (detours lib) SetDll.exe to Add a dll to an exe file.
-
I use MFC to build a win32 Dynimic-link library. Then I get a bb.dll.I use SetDll.exe to add bb.dll to gogosai.exe.When I choose A simple DLL project to build the dll,It does not work.When I choose A dll is exports some symbols project to build,It works. Why???
-
I use MFC to build a win32 Dynimic-link library. Then I get a bb.dll.I use SetDll.exe to add bb.dll to gogosai.exe.When I choose A simple DLL project to build the dll,It does not work.When I choose A dll is exports some symbols project to build,It works. Why???
Hi, From your posting it is not clear what you want to achieve. Please be specific and state clearly your actual problem. Nitheesh George http://www.simpletools.co.in
-
I use MFC to build a win32 Dynimic-link library. Then I get a bb.dll.I use SetDll.exe to add bb.dll to gogosai.exe.When I choose A simple DLL project to build the dll,It does not work.When I choose A dll is exports some symbols project to build,It works. Why???
Hi, After reading your posting 3 times, i think that you wanted to a dll reference to another project, right?. If so, when you create a dll project with some export functions the IDE adds the exporting function as like extern "C" __declspec(dllexport) void myFunc() { } This tells the C++ complier not to use name mangling. So you can use LoadLbrary to get a pointer to this function in this dll like HMODULE hMod = LoadLibrary("MyDlLL.dll"); GetProcAddress(hMod, "MyFunc"); this works well you specify extern "C"(Please see MSDN to know more about this). For a dll that doesn't exports any functions/class don't allow accessing the its functions or classes. If you don't wish to use the loadLibrary u can do the following steps to add a reference to a dll. 1. Mark the class as exported (__declspec(dllexport) class classA) 1. add the header file of the dll you want to refer. 2. Add the lib file of the dll to the linker options(Additional dependencies) of your project. 3. Make sure that you specify the path to lib correctly. 3. compile. Hopes this helps. Nitheesh George http://www.simpletools.co.in
-
Hi, After reading your posting 3 times, i think that you wanted to a dll reference to another project, right?. If so, when you create a dll project with some export functions the IDE adds the exporting function as like extern "C" __declspec(dllexport) void myFunc() { } This tells the C++ complier not to use name mangling. So you can use LoadLbrary to get a pointer to this function in this dll like HMODULE hMod = LoadLibrary("MyDlLL.dll"); GetProcAddress(hMod, "MyFunc"); this works well you specify extern "C"(Please see MSDN to know more about this). For a dll that doesn't exports any functions/class don't allow accessing the its functions or classes. If you don't wish to use the loadLibrary u can do the following steps to add a reference to a dll. 1. Mark the class as exported (__declspec(dllexport) class classA) 1. add the header file of the dll you want to refer. 2. Add the lib file of the dll to the linker options(Additional dependencies) of your project. 3. Make sure that you specify the path to lib correctly. 3. compile. Hopes this helps. Nitheesh George http://www.simpletools.co.in
-
Hi, After reading your posting 3 times, i think that you wanted to a dll reference to another project, right?. If so, when you create a dll project with some export functions the IDE adds the exporting function as like extern "C" __declspec(dllexport) void myFunc() { } This tells the C++ complier not to use name mangling. So you can use LoadLbrary to get a pointer to this function in this dll like HMODULE hMod = LoadLibrary("MyDlLL.dll"); GetProcAddress(hMod, "MyFunc"); this works well you specify extern "C"(Please see MSDN to know more about this). For a dll that doesn't exports any functions/class don't allow accessing the its functions or classes. If you don't wish to use the loadLibrary u can do the following steps to add a reference to a dll. 1. Mark the class as exported (__declspec(dllexport) class classA) 1. add the header file of the dll you want to refer. 2. Add the lib file of the dll to the linker options(Additional dependencies) of your project. 3. Make sure that you specify the path to lib correctly. 3. compile. Hopes this helps. Nitheesh George http://www.simpletools.co.in
i'm surprised you read it that many times! ...i give up on the first try...if i can't read it, i won't try to answer it...lol ...you're a lot kinder... :thumbsup:
-
i'm surprised you read it that many times! ...i give up on the first try...if i can't read it, i won't try to answer it...lol ...you're a lot kinder... :thumbsup:
Thank you Albert :) Nitheesh George http://www.simpletools.co.in
-
Thank you Albert :) Nitheesh George http://www.simpletools.co.in
you get my 5 just for trying that hard to help someone! :)