Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
mac
excel.macintosh
frontpage.mac
inetexplorer.mac
internet.mail.mac
internet.news.mac
mac.entourage
mac.excel
mac.explorer
mac.mediaplayer
mac.messenger
mac.office
mac.otherproducts
mac.powerpoint
mac.rdc
mac.virtualpc
mac.word
macintosh.general
media.player.mac
messenger.mac
office.mac
office.mac.entourage
outlook.mac
outlookexpress.mac
win2000.macintosh
windowsnt.mac
word.macword2001
  
 
date: Mon, 26 Feb 2007 10:08:03 +0000,    group: microsoft.public.office.mac        back       


Mac VBA calling shared lib   
Hi I'm attempting to call a function in a shared library from a VBA 
macro in Mac excel. This is a typical c function:

   extern "C" bool SetBootstraps(int nBootstraps)

In VBA I have it declared as:

   declare function SetBootstraps lib "mylib" (nBootstraps as long) as 
Boolean

When I attempt to run this via the c debugger I don't get the value 
passed down to excel that I would expect. What do I have to do to pass 
variables down correctly. Do I need to use CDecl in the VBA or do I need 
to use pascal in the C. Which is correct.

Also am I correct in thinking that the following is correct

VBA      C
Integer  short
Long     int
Double   double
Boolean  bool

Thanks
Ian
date: Mon, 26 Feb 2007 10:08:03 +0000   author:   Ian Kennedy

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us