MemoryModule x86 and x64 (static lib, import and example)
MemoryModule x86 and x64 (static lib, import and example)
MemoryModule is to load DLL from Memory!
This Version works with x86 and x64 in ASCII or Unicode.
Download
This Version works with x86 and x64 in ASCII or Unicode.
Download
Last edited by ts-soft on Fri Aug 03, 2012 9:57 pm, edited 1 time in total.
Re: MemoryModule x86 and x64 (static lib, import and example
Thanks for sharing, works great, especially x64 version .
Re: MemoryModule x86 and x64 (static lib, import and example
you are welcome
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: MemoryModule x86 and x64 (static lib, import and example
....source is in the source folder
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: MemoryModule x86 and x64 (static lib, import and example
I thought it was just the static library. I should have looked.MemoryModule static lib, import and example
Thanks, ts-soft!
Re: MemoryModule x86 and x64 (static lib, import and example
thx Thomas for the port....
also some infos available at:
http://www.joachim-bauch.de/tutorials/l ... om-memory/
also some infos available at:
http://www.joachim-bauch.de/tutorials/l ... om-memory/
SPAMINATOR NR.1
Re: MemoryModule x86 and x64 (static lib, import and example
Looks like it is not stable, with this code i get ~23500 loads and unloads of dll, it fails with invalid memory access (read error at address 68) on MemoryLoadLibrary(). Shouldn't it return 0 if it fails to load dll? Maybe it is some kind of memory leak, with bigger dll's i get invalid memory access sooner.
Code: Select all
XIncludeFile "MemoryModule.pbi"
DataSection
DLL: IncludeBinary "test.dll"
EndDataSection
For k=0 To 40000
Debug k
Define hDLL = MemoryLoadLibrary(?DLL)
If hDLL
MemoryFreeLibrary(hDLL)
EndIf
Next
Re: MemoryModule x86 and x64 (static lib, import and example
This is a problem with some 32-bit dll's, but i can't help. The same problem withcas wrote:Looks like it is not stable, with this code i get ~23500 loads and unloads of dll, it fails with invalid memory access (read error at address 68) on MemoryLoadLibrary(). Shouldn't it return 0 if it fails to load dll? Maybe it is some kind of memory leak, with bigger dll's i get invalid memory access sooner.
PBOSL_LoadDLLMemory and PurePROCS by gnozal.
greetings
Thomas
- netmaestro
- PureBasic Bullfrog
- Posts: 8433
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: MemoryModule x86 and x64 (static lib, import and example
Thanks, ts-soft, it's quite well done. I particulary appreciate the release format of static library, impervious to future changes in PB and as usual from you, source all in. The small price is a little .pbi for the imports, well worth it. Thanks again
BERESHEIT
Re: MemoryModule x86 and x64 (static lib, import and example
I overlooked the first line 'Import "oldnames.lib" : EndImport' and received a linker error. Replacing this line fixed it. But what is oldnames.lib?
A very accurate but also very unhelpful result as the first hit on google:
"What the hell is OLDNAMES.LIB?"
http://social.msdn.microsoft.com/forums ... db157c6d08
Most of the other results are just people looking for it. Would you care to share your wisdom?
A very accurate but also very unhelpful result as the first hit on google:
"What the hell is OLDNAMES.LIB?"
http://social.msdn.microsoft.com/forums ... db157c6d08
Most of the other results are just people looking for it. Would you care to share your wisdom?
Re: MemoryModule x86 and x64 (static lib, import and example
the c-source uses stricmp, this is an old function, removed from actuell libs. oldnames.lib is to wrap
the old function to new.
the old function to new.
Re: MemoryModule x86 and x64 (static lib, import and example
But isn't stricmp also in msvcrt.lib?
Re: MemoryModule x86 and x64 (static lib, import and example
only in old versions.Mistrel wrote:But isn't stricmp also in msvcrt.lib?
Re: MemoryModule x86 and x64 (static lib, import and example
Update:
Recompiled from Source-Version 0.03
Recompiled from Source-Version 0.03
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.