Page 1 of 1 1
Topic Options
#46319 - 2003-10-06 01:52 PM Call WIN32API function
andysk Offline
Fresh Scripter

Registered: 2003-09-18
Posts: 14
Hi,
Anybody know how to call Win32API function from KIX32 ?
For ex. GetWindowsDirectory().
I know %WINDIR% can get the same value, but i am just trying to know how to call win32api since i don't know if all function in Win32api has been adopted by kix32 or not.

Top
#46320 - 2003-10-06 02:01 PM Re: Call WIN32API function
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Andy,

No, there is no built-in facility for calling WIN32 API's directly ... other options include the RUNDLL utility (very crude) and third-party COM snappin's that allow you to map API's, then call them. If your interested in the COM thingy let me know an I will hunt it down for you, the name escapes me at the moment.

Top
#46321 - 2003-10-07 08:12 AM Re: Call WIN32API function
andysk Offline
Fresh Scripter

Registered: 2003-09-18
Posts: 14
Hi Shawn,

Too bad kix doesn't support WIN32API calling, while with WIN32API we can do a lot of things.
ex. Win95, and Win98 doesn't have %WINDIR%.

Top
#46322 - 2003-10-07 09:07 AM Re: Call WIN32API function
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Andy,

Not sure what you're talking about with Windows 95/98 and not having %windir%.

They most certainly do.

From Command.com console type

CD %WINDIR% [Then hit ENTER]

You should end up in your Windows folder on the C: drive. (Windows 9x must be installed on the C: drive)

This can also be used in a BATCH file or a KiX script.

Did you mean some other command?

Is there something more specific you're trying to accomplish? Please let us know and I'm sure someone here will be able to help you further.

[ 07. October 2003, 09:45: Message edited by: NTDOC ]

Top
#46323 - 2003-10-08 12:40 AM Re: Call WIN32API function
andysk Offline
Fresh Scripter

Registered: 2003-09-18
Posts: 14
Windows 95/98 doesn't recognize %WINDIR%. ex. (at command prompt you type) %WINDIR%\COMMAND\FDISK.EXE, the error will appear. On Windows NT - Windows 2003, they do recognize %WINDIR%
Top
#46324 - 2003-10-07 01:07 PM Re: Call WIN32API function
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nope.
windir is environment variable set in win9x and NT based systems.
if you don't have WINDIR, you may have windir.
but that is definitely set on the computer.
_________________________
!

download KiXnet

Top
#46325 - 2003-10-08 07:28 AM Re: Call WIN32API function
andysk Offline
Fresh Scripter

Registered: 2003-09-18
Posts: 14
It's true unless you set it at autoexec.bat using SET command
Top
#46326 - 2003-10-08 08:41 AM Re: Call WIN32API function
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Agreed with you about the SET Command.. However, if you use a simplified AUTOEXEC.BAT or none at all in W9x, you will be able to run -

FDISK without having to do - %WINDIR%\COMMAND\FDISK.EX as it is already in the search path.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 756 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org