-llibkernel32 -> ld.exe: cannot find -llibkernel32

Übersicht BlitzMax, BlitzMax NG Beginners-Corner

Neue Antwort erstellen

Xaymar

ehemals "Cgamer"

Betreff: -llibkernel32 -> ld.exe: cannot find -llibkernel32

BeitragMi, Sep 22, 2010 18:11
Antworten mit Zitat
Benutzer-Profile anzeigen
Titel sagt eigentlich mein Problem. Ich versuche eine Windows DLL einzubinden, nur schlägt dies fehl.
BlitzMax: [AUSKLAPPEN]
'User32.dll Wrapper
Global User32_DllHandle:Int
Function FunctionExists:Int(func:Byte Ptr)
If Int(func)<>0 Then Return True
Return False
EndFunction

'User32_DllHandle = LoadLibraryA("User32.dll")
'If User32_DllHandle = 0 Then RuntimeError("User32.dll dynamic linking failed")
Extern "Win32"
Function GetPrivateProfileString_:Int(an:String, kn:String, df:String, rs:Byte Ptr, sz:Int, fn:String)
EndExtern
'"Win32" = GetProcAddress(User32_DllHandle, "_GetPrivateProfileStringA@24")


If FunctionExists(GetPrivateProfileString_) = False
RuntimeError("User32.dll dynamic linking failed -> GetPrivateProfileStringA")
Else
Function GetPrivateProfileString:String(sSection:String, sKey:String, sDefault:String, sFile:String)
Local Bank:TBank = CreateBank(256), BankPtr:Byte Ptr = Bank.Lock()
Local ReturnString:String = sSection+sKey+sDefault+sFile

If GetPrivateProfileString_(sSection, sKey, sDefault, BankPtr, 255, sFile)
Bank.Unlock()

For Local BankPos:Int = 0 To 255
Local Char:Byte = Bank.PeekByte(BankPos)
If Char = 0 Then Exit
ReturnString = ReturnString + Chr(Char)
Next
Else
Bank.Unlock()
EndIf

BankPtr = Null
Bank = Null

GCCollect()

Return ReturnString
EndFunction
DebugLog GetPrivateProfileString("A", "B", "C", "D")
EndIf


Wie mach ich das richtig?
Warbseite

Suco-X

Betreff: ...

BeitragSa, Sep 25, 2010 17:55
Antworten mit Zitat
Benutzer-Profile anzeigen
Code: [AUSKLAPPEN]

 Function GetPrivateProfileStringW:Int(an:Byte Ptr, kn:Byte Ptr, df:Byte Ptr, rs:Byte Ptr, sz:Int, fn:Byte Ptr)


Mfg Suco
Intel Core 2 Quad Q8300, 4× 2500 MHz, 4096 MB DDR2-Ram, GeForce 9600GT 512 MB

Neue Antwort erstellen


Übersicht BlitzMax, BlitzMax NG Beginners-Corner

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group