Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Windows API Functions

I have copied the following declaration and an accompaning function call from
Walkenbach"s p\Power Programming With VBA.

Declare Function GetWindowsDirectoyA Lib "Kernel32" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long

I get the runtime error "Can't find DLL entry point GetWindowsDirectoryA in
kernel32.

I am using WindowsXP home ed. Does anyone know if XP has that function?

--
Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Windows API Functions

GetWindowsDirectoryA
not
GetWindowsDirectoyA
--
Gary''s Student - gsnu200772
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Windows API Functions

You have a typo in GetWindowsDirectoyA , missing an"r" before the "y"

Public Declare Function GetWindowsDirectory _
Lib "kernel32" Alias "GetWindowsDirectoryA" ( _
ByVal lpBuffer As String, _
ByVal nSize As Long) As Long

Although not necessary, to adhere to convention you might copy the API as
written above (line breaks optional)

Regards,
Peter T



"LesHurley" wrote in message
...
I have copied the following declaration and an accompaning function call

from
Walkenbach"s p\Power Programming With VBA.

Declare Function GetWindowsDirectoyA Lib "Kernel32" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long

I get the runtime error "Can't find DLL entry point GetWindowsDirectoryA

in
kernel32.

I am using WindowsXP home ed. Does anyone know if XP has that function?

--
Thanks for your help



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Windows API Functions

What a difference a letter mkes. Thanks
--
Thanks for your help


"Peter T" wrote:

You have a typo in GetWindowsDirectoyA , missing an"r" before the "y"

Public Declare Function GetWindowsDirectory _
Lib "kernel32" Alias "GetWindowsDirectoryA" ( _
ByVal lpBuffer As String, _
ByVal nSize As Long) As Long

Although not necessary, to adhere to convention you might copy the API as
written above (line breaks optional)

Regards,
Peter T



"LesHurley" wrote in message
...
I have copied the following declaration and an accompaning function call

from
Walkenbach"s p\Power Programming With VBA.

Declare Function GetWindowsDirectoyA Lib "Kernel32" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long

I get the runtime error "Can't find DLL entry point GetWindowsDirectoryA

in
kernel32.

I am using WindowsXP home ed. Does anyone know if XP has that function?

--
Thanks for your help




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i want all windows in one excel frame (windows in taskbar) Subramanya Excel Discussion (Misc queries) 1 December 18th 09 03:14 PM
cannot open exel from windows xp in windows vista and visa versa lildiana New Users to Excel 4 February 25th 09 07:26 PM
can windows vista edit shared document from windows xp sasa Excel Worksheet Functions 1 January 9th 08 06:44 PM
Page breaks are different in Windows 2000 and Windows XP Bill Allen Excel Discussion (Misc queries) 1 November 23rd 05 04:42 PM
Can Excel interact with other Windows functions Fredrik Wahlgren Excel Programming 0 April 13th 05 03:54 PM


All times are GMT +1. The time now is 08:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"