search for: getmodulehandle

Displaying 20 results from an estimated 30 matches for "getmodulehandle".

2010 Oct 04
0
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
...o the same thing while encapsulating things in a "C" export to keep the names simple for easy import. If that is really the only issue, I could easily fix it. I figured it was something more complex... And yes, you can import stuff from the executable into a dynamic library in Windows, GetModuleHandle being passed null/0/etc... will give a module link to the primary running executable, upon which you can then pull in things it exports with ease. LoadLibrary will link in a dynamic library if it is not already linked in, then calls GetModuleHandle on it, then returns what GetModuleHandle returns...
2010 Oct 04
1
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
>>> Any help will be much appreciated. Thanks! >> Windows does not support dynamic linking. You will need to resolve >> externals by hand. > > Why would it not support dynamic linking?  What about loadlibrary and > its kin are not sufficient to handle this? Well, you cannot easily export stuff from an executable and this is the main issue here. (And you cannot e.g.
2010 Oct 02
4
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
Hi Buit the Kaleidoscope example under MinGW and everything runs fine except when I try the following example in Chapter 6: extern printd(x); printd(123); where printd is the library function defined in C as extern "C" double printd(double X) { printf("%f\n", X); return 0; } The error message is: LLVM ERROR: Program used external function
2020 Aug 18
2
Re: [PATCH nbdkit 1/9] server: Add libnbdkit.so.
On 8/18/20 8:53 AM, Richard W.M. Jones wrote: > On Tue, Aug 18, 2020 at 07:48:43AM -0500, Eric Blake wrote: >>> +extern int nbdkit_main (int argc, char *argv[]); >> >> A bit odd to declare this in a .c; but I don't see any existing >> decent .h to put it in, nor is it worth adding a new one just for >> this. So it is fine right here. > > Yup, better
2007 Jan 03
0
[824] trunk/wxruby2/swig/classes/App.i: Remove some ifdefs for old unstable versions of WxWidgets
...nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspbool enterLoop); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwxEntry(GetModuleHandle(NULL),0,"",true,true); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp#else -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&n...
2010 Oct 09
2
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
...quot;, X);return 0;} >> > >> >  typedef void(*pfunc)(double); >> > >> > } >> > >> > adding in main() >> > >> > //typedef void(*pfunc)(double); >> > >> > pfunc printd; >> > >> > HMODULE self = GetModuleHandle(0); >> > >> > printd = (pfunc)GetProcAddress(self, "printd"); >> > >> > >> > >> > However I'm getting the same error message. It would be really great if >> > you >> > could point me to what I'm doing wrong &g...
2016 Apr 02
2
getSymbolAddressInProcess returning null
Tried that, still didn't work. Then I tried making a direct API call, GetProcAddress(GetModuleHandle(0),"foo") And this works if and only if __declspec(dllexport) is supplied. So it looks like we were both right. On Sat, Apr 2, 2016 at 9:29 AM, NAKAMURA Takumi <geek4civic at gmail.com> wrote: > Have you tried to add dllexport? > > On Sat, Apr 2, 2016 at 4:23 PM Russell...
2020 Aug 19
0
Re: [PATCH nbdkit 1/9] server: Add libnbdkit.so.
...(DLL) to get the address of symbols in nbdkit.exe. It works a bit like dlsym. I hacked together a test plugin to try this: static void load (void) { int (*_nbdkit_parse_int) (const char *what, const char *str, int *r) = GetProcAddress (GetModuleHandle (NULL), "nbdkit_parse_int"); fprintf (stderr, "nbdkit_parse_int addr = %p\n", _nbdkit_parse_int); void (*_nbdkit_debug) (const char *msg, ...) = GetProcAddress (GetModuleHandle (NULL), "nbdkit_debug"); _nbdkit_debug ("calling nbdkit_debug now ...")...
2009 Apr 03
3
No icons in my app
How programs looks executed on WINE (Ubuntu 8.10): http://i41.tinypic.com/2nsnvxh.jpg And on WinXP SP3: http://i39.tinypic.com/6fm6o7.jpg Note there's also no text on StatusBar. Icons are loaded from resources with LoadImage(GetModuleHandle(0), 1, IMAGE_ICON, 0,0,0)). Any ideas? Thanks in advance.
2010 Nov 04
1
Fwd: win32/process - small bug?
It might be a bit before I can get to this, so I thought I''d pass it on. Also, while I was stuck in the airport in Minneapolis, I decided that the getrlimit method should be refactored to remove the process from the job (if it wasn''t already in one) after it''s finished, if possible. Dan ---------- Forwarded message ---------- From: Ben Nagy <ben.nagy.web at
2007 Mar 16
0
Wine release 0.9.33
...advapi32/tests: Make use of skip. shell32/tests: Rewording and cleanup. msi/tests: Properly cleanup after each test. programs/winetest: Raise fileversion. mapi32/tests: Don't run tests if functions are not implemented. advapi32/tests: Don't use FreeLibrary with GetModuleHandle. advapi32/tests: Move skip to a more appropriate place. gdi32/tests: Make sure we can run on win9x and NT again. gdi32/tests: Use skip where appropriate. winspool.drv/tests: Remove tempfile after running the tests. localspl/tests: Remove tempfile after running the test...
2010 Oct 09
0
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
...typedef void(*pfunc)(double); > >> > > >> > } > >> > > >> > adding in main() > >> > > >> > //typedef void(*pfunc)(double); > >> > > >> > pfunc printd; > >> > > >> > HMODULE self = GetModuleHandle(0); > >> > > >> > printd = (pfunc)GetProcAddress(self, "printd"); > >> > > >> > > >> > > >> > However I'm getting the same error message. It would be really great > if > >> > you > >> >...
2007 Aug 24
0
Wine release 0.9.44
...Paul Vriens (41): advapi32/tests: Make tests run again on win95. d3d8/tests: Make tests run again on win95. crypt32/tests: Make tests run again on win95. ntdll/tests: Make tests run again on win95. shell32/tests: Make tests run again on win95. advapi32/tests: Use GetModuleHandleA and skip. cabinet/tests: Use GetModuleHandleA instead of LoadLibraryA. crypt32/tests: Use GetModuleHandle and skip. msvcrt/tests: Remove wrong FreeLibrary and fix typo's. secur32/tests: Run tests on win95 again. user32/tests: Run tests on win95 again. shell3...
2009 Aug 06
1
WH_KEYBOARD_LL vs GetKeyState
...&chars, 0)) { if((char)chars == '\r') putchar('\n'); else putchar(chars); } } return CallNextHookEx(NULL, nCode, wParam, lParam); } int main(int argc, char** argv) { HHOOK hhk = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, GetModuleHandle(NULL), 0); MSG msg; while(GetMessage(&msg, NULL, 0, 0) > 0); UnhookWindowsHookEx(hhk); return 0;
2012 Oct 31
0
file.symlink() creates zero-size file/link on Windows 7/NTFS/admin
...ty file/link and removed it together with a warning/an error analogously to the other conditions it may throw? DETAILS: >From src/main/platform.c::do_filesymlink() it looks like it's Windows that creates the empty file but still returning 0: #ifdef Win32 [...] pCSL = (PCSL) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "CreateSymbolicLinkW"); [...] LOGICAL(ans)[i] = pCSL(to, from, isDir) != 0; if(!LOGICAL(ans)[i]) warning(_("cannot symlink '%ls' to '%ls', reason '%s'"), from, to, formatError(GetLastError())); > sessionInfo() R...
2016 Apr 02
3
getSymbolAddressInProcess returning null
I've finally managed to extract from Kaleidoscope one particular thing that it seems to me should be working and isn't. Given the global declaration extern "C" void foo() {} within the same program I have RTDyldMemoryManager::getSymbolAddressInProcess("foo") And it's returning null. (LLVM 3.8, Windows 7 x64.) What am I missing? -------------- next part
2015 Jan 27
3
[LLVMdev] build failure on mingw gcc 4.9.1
On Tue, Jan 27, 2015 at 10:02 AM, Mueller-Roemer, Johannes Sebastian <Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote: > Adding -D__MSVCRT_VERSION__=0x900 (or higher) to CMAKE_CXX_FLAGS and > -lmsvcr90 (or higher) to CMAKE_CXX_STANDARD_LIBRARIES appears to work. > -lmsvcrt80 does not work, contrary to the comment on the MinGW bug tracker. > However, if you do not
2013 May 05
4
Bug fix and compatibility patches for 1.3.0pre4
...with the buffering in stdio streams), except when > _MAC is defined (which I presume is not common). I don't actually have > XP to test against. Bad, do no declare manually, I had to cleanup some bad code recently that make assumptions about your header declarations. You can try using GetModuleHandle/GetProcAddress instead, but msvcr* versions are a whole different can of worms. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 834 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/f...
2010 Sep 20
1
Dynamic forking in Win32
...; printf("Using Existing Mem for New EXE at %X\n", (uint)v); } else { /* get address of ZwUnmapViewOfSection */ PTRZwUnmapViewOfSection pZwUnmapViewOfSection = (PTRZwUnmapViewOfSection)GetProcAddress( GetModuleHandle("ntdll.dll"), "ZwUnmapViewOfSection"); if (!pZwUnmapViewOfSection) { eprintf("Could not load ZwUnmapViewOfSection from ntdll.dll\n"); TerminateProcess(pi.hProcess, 0); exit(1); } /* t...
2008 Jun 13
0
Wine release 1.0-rc5
...NEUTRAL. Paul Vriens (20): setupapi/tests: Fix test for win9x and Vista. iphlpapi/tests: Fix crash on Vista. iphlpapi/tests: Fix test on Vista. advpack/tests: Add a FreeLibrary and a skip message. kernel32/tests: Add a skip message for win95. comdlg32/tests: Use GetModuleHandle instead of LoadLibrary. setupapi/tests: Fix a test on Windows 2000. setupapi/tests: Fix two more tests on Windows 2000. ole32/tests: Fix crash on W2K and below. ole32/tests: Fix crash on NT4 and below. ntdll/tests: Free memory after use. ole32/tests: Only skip th...