HELP for GetIP address

forum.advanced.programming (1998-2005)
Tomas Svizensky

HELP for GetIP address

Post by Tomas Svizensky » 15 Oct 2004, 08:32

 Posted by:  Tomas Svizensky 

Hi guru's of CTD

In attach file is source of GetIP for CTD 1.1.x.
This is O.K. on machine (PC) with 10/100 MBit NETcard.
But on PC with 1 GBit NETcard is generated GPF on row :

Code: Select all

! ##################
! G P F   on 1 GB NET card
! ##################
Call CStructCopyFromFarMem( nIP, sBuff, 1000 )
! ###################
Program created LOG file in SubDirectory.

Please, help me for running on PC with 1 GBit NETcard.
Thanx

Regards
Tomas
You do not have the required permissions to view the files attached to this post.

Pawel Streich

Re: HELP for GetIP address

Post by Pawel Streich » 15 Oct 2004, 09:20

 Posted by:  Pawel Streich 

See SalExtension
https://samples.tdcommunity.net/index.p ... Extension/

Regards,

Pawel

E-mail: pawelspriv@wp.pl
Country: Poland
City: Szczecin

Tomas Svizensky

Re: HELP for GetIP address

Post by Tomas Svizensky » 15 Oct 2004, 11:14

 Posted by:  Tomas Svizensky 

Hi

How to use [CC] IPAddress ? What Functions for GET IP ?

Regards
Tomas

Pawel Streich

Re: HELP for GetIP address

Post by Pawel Streich » 15 Oct 2004, 11:30

 Posted by:  Pawel Streich 

Function: SalSysGetIP from SalExtension.apl

--

Regards,

Pawel

E-mail: pawelspriv@wp.pl
Country: Poland
City: Szczecin

Christian Astor

Re: HELP for GetIP address

Post by Christian Astor » 21 Oct 2004, 13:25

 Posted by:  Christian ASTOR 


The function is the same and also not completely correct.
The struct size must be at least MAXGETHOSTSTRUCT but probably it won't change nothing.

RtlMoveMemory() can be used instead.
But there are some other ways to get IP address :

SNMP(difficult), WSAIoctl() (KB186312), GetIpAddrTable()(easy),...

Thomas Lauzi

Re: HELP for GetIP address

Post by Thomas Lauzi » 30 Nov 2004, 16:14

 Posted by:  Thomas Lauzi 

Hi Christian,
I tried to fix the issue in SalSysGetIP like you described, but I doesn´t
work :-(
What did I wrong?

Code: Select all

!!CB!! 145
Function: RtlMoveMemory
 Description:
 Export Ordinal: 0
 Returns
 Parameters
  Receive String: LPVOID
  Number: LPVOID
  Number: DWORD

Code: Select all

!!CB!! 70
!
Set nMAXGETHOSTSTRUCT = 1024
Call SalStrSetBufferLength( spMem, nMAXGETHOSTSTRUCT )
! Call CStructCopyFromFarMem( nStructPointer, spMem, nMAXGETHOSTSTRUCT )
Call RtlMoveMemory( spMem, nStructPointer, nMAXGETHOSTSTRUCT )

Regards,
Thomas L.

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 1 guest