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 :
! ##################
! G P F on 1 GB NET card
! ##################
Call CStructCopyFromFarMem( nIP, sBuff, 1000 )
! ###################
Program cretaed LOG file in SubDirectory.

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

Regards
Tomas

Attachment: GetIP.ZIP

Pawel Streich

HELP for GetIP address

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

 Posted by:  Pawel Streich 

See SalExtension

--

Regards,

Pawel
--------------------------Profil----------------------------
OS: WindowsXP SP1
GUPTA: TD3.1 PTF2
Dbs: SQLBase, PostgreSQL, MSSQL Server
E-mail: pawelspriv@wp.pl
Country: Poland
City: Szczecin
--------------------------------------------------------------
U¿ytkownik "Tomas Svizensky" napisa³ w wiadomoœci
news:HnIfCBosEHA.1820@guptaweb...

Tomas Svizensky

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

HELP for GetIP address

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

 Posted by:  Pawel Streich 

Function: SalSysGetIP from SalExtension.apl

--

Regards,

Pawel
--------------------------Profil----------------------------
OS: WindowsXP SP1
GUPTA: TD3.1 PTF2
Dbs: SQLBase, PostgreSQL on LINUX, MSSQL Server
E-mail: pawelspriv@wp.pl
Country: Poland
City: Szczecin
--------------------------------------------------------------
U¿ytkownik "Tomas Svizensky" napisa³ w wiadomoœci
news:eGzKadpsEHA.1952@guptaweb...

Christian Astor

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

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?

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

!!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 2 guests