KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Getting the Network Component ID for 4D Open for 4D
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: July 10, 2002

Compatibility: 6.5.x , 6.7.x, and 6.8.x

Here is a simple method that will obtain the Network Component ID before you can load the Network Component with the command OP Load network component.



` Project Method: GetCompID

` Description: Return the Component ID

`

` $1 - TCP/IP, ADSP or PX

` $0 - Return -1 if the requested component is not installed



C_LONGINT($0)

C_TEXT($1)

$0:=-1

$ErrCode:=OP Count network components ($Count)

For ($i;1;$Count)

 $ErrCode:=OP Get network component info ($i;$CompID;$Component)

If ($ErrCode=0)

 If (Position($1;$Component)>0)

   $0:=$CompID

  $i:=$Count+1

 End if

End if

End for




Since the Network Component ID may be different on Mac and PC, this method will allow you to get an appropriate Network Component ID for that specific platform.