 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Tue Nov 06, 2007 6:46 pm Post subject: create a DllCall based on help description |
|
|
Hi,
I need help to create a DllCall again. This is the definition I have from the help file that comes with the dll: | Quote: | DWORD __stdcall FSL2EnumLayerExclude(LPCSTR fslGUID, DWORD index, LPSTR excludePathBuffer, LPDWORD excludePathBufferLen, LPDWORD excludeType)
Enumerates the exclude entries for a layer
Return Value
Returns one of the following
FSL2_ERROR_SUCCESS On success
FSL2_ERROR_LAYER_NOT_FOUND When done
Parameters
fslGUID Identifies the layer.
index Index of exclude entry to enumerate
excludePathBuffer On success will point the value of the exclude entry
excludePathBufferLen Pointer to the size of the excludePathBuffer On success will contain the size of the string stored in ExcludePathBuffer
excludeType On success will contiant the type of exclude entry |
This is what I got so far: | Code: | Loop, 5
{
ID := A_Index
VarSetCapacity(excludePathBuffer, 260)
excludePathBufferLen = 000
excludeType = 0
RetVal := DllCall("fsllib32\FSL2EnumLayerExclude"
, "Str", fslGUID
, "UInt", ID
, "Str", excludePathBuffer
, "UInt *", excludePathBufferLen
, "UInt *", excludeType)
excludes .= ID . " - " . RetVal . " - " . excludePathBuffer . " - " . excludePathBufferLen . " - " . excludeType . "`n`"
} | I'm sure that the fslGUID I use is valid since other dllcalls work fine. But the return value indicates that the layer is not found. Did I specify the parameter types wrong? _________________ Ciao
toralf  |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Tue Nov 06, 2007 7:47 pm Post subject: |
|
|
| Code: |
Loop, 5
{
ID := A_Index
VarSetCapacity(excludePathBuffer, 260)
excludePathBufferLen = 000
excludeType = 0
RetVal := DllCall("fsllib32\FSL2EnumLayerExclude"
, "Str", fslGUID
, "UInt", ID
, "Str *", excludePathBuffer
, "UInt *", excludePathBufferLen
, "UInt *", excludeType)
excludes .= ID . " - " . RetVal . " - " . excludePathBuffer . " - " . excludePathBufferLen . " - " . excludeType . "`n`"
}
|
can you share the dll? _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Tue Nov 06, 2007 9:39 pm Post subject: |
|
|
| engunneer wrote: | | can you share the dll? | Yes, It is belonging to SVS by Altiris. You can get the dll here. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Wed Nov 07, 2007 1:14 am Post subject: |
|
|
The syntax looks correct. So, obvious question: Have you loaded the library at the start-up, which may be necessary for this?
| Code: | | DllCall("LoadLibrary", "str", "fsllib32") |
Or, you may have to specify the buffer length as input too:
| Code: | | excludePathBufferLen := VarSetCapacity(excludePathBuffer) |
|
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Wed Nov 07, 2007 8:58 pm Post subject: |
|
|
Thanks Sean,
The last tip was the missing.
I got it working. Thanks a lot to all of you. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|