forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[resolved] NT API Help...

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Jun 16, 2004 7:28 pm    Post subject: [resolved] NT API Help... Reply with quote

Can anyone tell me if I have the api setup right for VDS 5? And if so,
can anyone test it for me on a NT system to see if actually works?

Code:
REM  Declare Function MoveFileEx Lib "kernel32" Alias "MoveFileExA"
REM  (ByVal lpExistingFileName As String,
REM  ByVal lpNewFileName As String,
REM  ByVal dwFlags As Long) As Long

REM  MOVEFILE_REPLACE_EXISTING = &H1
REM  MOVEFILE_COPY_ALLOWED = &H2
REM  MOVEFILE_DELAY_UNTIL_REBOOT = &H4

  LIST CREATE,1
  LIST ADD,1,TEST
  LIST SAVEFILE,1,C:\apitest.txt
  LIST CLEAR,1
  LIST CLOSE,1

  %%lpExistingFileName = C:\apitest.txt
  %%lpNewFileName =

  LOADLIB KERNEL32.DLL
  %I = @LIB(kernel32,MoveFileExA,%%lpExistingFileName,%%lpNewFileName,H4)
  FREELIB KERNEL32.DLL


Thanks in advance,

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Jun 16, 2004 7:39 pm    Post subject: Reply with quote

Nevermind..... Someone already posted the proper code for this api in
another thread.

Thanks anyway Smile

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Jun 16, 2004 8:25 pm    Post subject: Reply with quote

Just for future reference, anytime you see something like &h4 or 0x4, that is equal to $04 in VDS.
&h and 0x tell the compiler that what follows is hex, just like $ does in VDS.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Jun 16, 2004 10:37 pm    Post subject: Reply with quote

Thanks... I didn't know that, so I'm glad you mentioned it. Smile
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jun 18, 2004 11:50 pm    Post subject: Reply with quote

Yes good tip. Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group