On Jun 13, 2012, at 11:54 PM, Rob Laveaux wrote:
>
> On 13 jun. 2012, at 18:35, Jorge <
jo...@jorgechamorro.com> wrote:
>
>> Now I definitely know that I *can* grab "On Startup", "On Server Startup", etc, too, but I'd need to know how to map "On Startup" to its ID, "On Server Startup" to its ID, etc.
>
> Hi Jorge,
>
> Have a look at the DBPR resource. It contains the resource IDs of the various database methods.
>
> HTH,
>
> - Rob Laveaux
Indeed, that helps a lot!
C_BLOB($blob)
C_LONGINT($id;$err)
ARRAY INTEGER($methodIDs;0)
ARRAY STRING(31;$methodNames;0)
API Get Method Names ($methodNames;$methodIDs)
$err:=API Get Indexed Resource ("DBPR";1;$blob)
If ($err=0)
$id:=$blob{0}*256+$blob{1}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Startup"
$methodIDs{1}:=$id
End if
$id:=$blob{2}*256+$blob{3}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Server Startup"
$methodIDs{1}:=$id
End if
$id:=$blob{4}*256+$blob{5}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Exit"
$methodIDs{1}:=$id
End if
$id:=$blob{6}*256+$blob{7}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Server Shutdown"
$methodIDs{1}:=$id
End if
$id:=$blob{8}*256+$blob{9}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Server Open Connection"
$methodIDs{1}:=$id
End if
$id:=$blob{10}*256+$blob{11}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Web Connection"
$methodIDs{1}:=$id
End if
$id:=$blob{12}*256+$blob{13}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Server Close Connection"
$methodIDs{1}:=$id
End if
$id:=$blob{14}*256+$blob{15}
If ($id#0xFFFF)
INSERT ELEMENT($methodNames;1)
INSERT ELEMENT($methodIDs;1)
$methodNames{1}:="On Web Authentication"
$methodIDs{1}:=$id
End if
End if
Thank you very much Rob.
Cheers,
--
Jorge.