![]() ![]() You don't check to see if hndl is NULL or not. You'll need to account for the different directories when building a 64-bit application vs a 32-bit application when loading DLLs like mozglue.dll By default 64-bit Mozilla should be placed in C:\Program Files\Mozilla Firefox\ and 32-bit Mozilla in C:\Program Files (x86)\Mozilla Firefox\. If you need to support both 32-bit programs and 64-bit the easiest way is to install the 32-bit version of the Mozilla DLLs (via a 32-bit Mozilla install) and you do the same for 64-bit Mozilla. Additionally, a 32-bit process cannot load a 64-bit DLL. On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). For more information, see Running 32-bit Applications. You can run Win32-based applications on 64-bit Windows using an emulation layer. This is described in MSDN's Process Interopability information: Your first issue is that 64-bit programs can't load 32-bit DLLs and 32-bit programs can't load 64-bit DLLs for the purposes of executing code. Return !(!fpNSS_INIT || !fpNSS_Shutdown || !PK11GetInternalKeySlot || !PK11Authenticate || !PK11SDRDecrypt || !PK11FreeSlot) PK11SDRDecrypt = (PK11SDR_Decrypt)GetProcAddress(hndl, "PK11SDR_Decrypt") PK11Authenticate = (PK11_Authenticate)GetProcAddress(hndl, "PK11_Authenticate") PK11FreeSlot = (PK11_FreeSlot)GetProcAddress(hndl, "PK11_FreeSlot") ![]() ![]() Ss3.dll", NULL, LOAD_LIBRARY_AS_DATAFILE) įpNSS_INIT = (NSS_Init)GetProcAddress(hndl, "NSS_Init") įpNSS_Shutdown = (NSS_Shutdown)GetProcAddress(hndl, "NSS_Shutdown") Hndl = LoadLibraryExW(L"C:\\Program Files\\Mozilla Firefox Hndl = LoadLibraryExW(L"C:\\Program Files\\Mozilla Firefox\\mozglue.dll", NULL, LOAD_LIBRARY_AS_DATAFILE) PK11_GetInternalKeySlot PK11GetInternalKeySlot Typedef SECStatus(*PK11SDR_Decrypt) (SECItem *, SECItem *, void *) Typedef SECStatus(*PK11_Authenticate) (PK11SlotInfo *, int, void *) Typedef void(*PK11_FreeSlot) (PK11SlotInfo *) Typedef PK11SlotInfo * (*PK11_GetInternalKeySlot) (void) Typedef SECStatus(*NSS_Init) (const char *) Typedef struct PK11SlotInfoStr PK11SlotInfo Now GetLastError returns 0 but GetProcAddress fails. ![]() LoadLibraryW(L"C:\\Program Files\\Mozilla Firefox\\mozglue.dll") LoadLibraryExW(L"C:\\Program Files\\Mozilla Firefox\\mozglue.dll", NULL, LOAD_LIBRARY_AS_DATAFILE) MessageBoxW(NULL, errorBuff, L"GetLastError", MB_OK) StringCbPrintfW(errorBuff, MAX_PATH, L"%d", dwError) Hndl = LoadLibraryW(L"C:\\Program Files\\Mozilla Firefox\\mozglue.dll") LoadLibrary(mozglue.dll) works good in a 32bit windows with Mozilla FireFox 86 I installed Mozilla FireFox 圆4 in a 64bit windows, now I want to LoadLibrary(mozglue.dll) but I receive error number 193 ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |