PC Review


Reply
Thread Tools Rate Thread

add-in / dll import function

 
 
youssma
Guest
Posts: n/a
 
      3rd Nov 2009
hi,
i have developped an add-in that exports some functions to the excel api
throw the excel4(xlfregister..) function. But i need to export some other
functions that are defined in another dll (linked to the add-in). i didn't
success to make it work.
someone has an idea about what should be done for that?
many thanks in advance
youssma
 
Reply With Quote
 
 
 
 
youssef alaoui
Guest
Posts: n/a
 
      19th Nov 2009
On 3 nov, 19:20, joel <joel.413...@thecodecage.com> wrote:
> You are probably having an issue in the way you compiled the addi-ins.
> There are two methods used for calling a routine. *The "standard
> microsoft method" and the "C-Language method". *Depending on the
> compiler options and the declarations of the function how the functions
> are called. *Often DLLs have multiple netry points for the same function
> which provides compatibility for being called from bot methods.
>
> I think the solution is in the 1st DLL make sure you define the 2nd Dll
> functions using the correct method.
>
> --
> joel
> ------------------------------------------------------------------------
> joel's Profile:http://www.thecodecage.com/forumz/member.php?userid=229
> View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=150545
>
> Microsoft Office Help



hi joel,
thanks for your answer.
do you mean that i need to duplicate the declarations of my functions
in the xll and make an explicite (or implicite call) from them to the
functions declared in my dll? this will make the calling process slow.
i was wonderning if there was a solution that enables me to register
my functions from the dlll directly to the excel menu interface.

youssma
 
Reply With Quote
 
youssef alaoui
Guest
Posts: n/a
 
      19th Nov 2009
On 19 nov, 12:14, joel <joel.41w...@thecodecage.com> wrote:
> first you still have to solve your inital calling problem if you where
> going to create an add-in to be loaded into excel. *Second, I think you
> are wrongg with the speed issue. *If you don't declare a variable in VBA
> is is assumed to be a variant. *When you have variants excels can learn
> from the object(s) the properties but this takes longer the first time
> you call the code.
>
> Here is an example of the declaration statement when calling a dll from
> VBA
>
> Public Declare Function FtpGetFile Lib "wininet.dll" Alias
> "FtpGetFileA" _
> (ByVal hFtpSession As Long, ByVal lpszRemoteFile As String, _
> ByVal lpszNewFile As String, ByVal fFailIfExists As Boolean,
> ByVal dwFlagsAndAttributes As Long, _
> ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
>
> The calling process use the Microsoft Standard method for creatting the
> call stack. *Most compilers on windos have options to either compile the
> code as Standard or C-Language. *If you don't understand tthe difference
> see this article
>
> 'Calling convention - Wikipedia, the free encyclopedia'
> (http://en.wikipedia.org/wiki/Calling_convention)
>
> --
> joel
> ------------------------------------------------------------------------
> joel's Profile:http://www.thecodecage.com/forumz/member.php?userid=229
> View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=150545
>
> Microsoft Office Help


i'm trying to use the c-language calling procedure by using an xll to
load my function in the excel menu. i succeded to load functions that
are declared in the xll i'm using but my question is about loading
throw this xll, functions that are declared in an other dll.
anyway, thank you for your answers. i'll search deeply on that.
many thanks

regards,
youssma
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import using Split Function =?Utf-8?B?TGVBbm4=?= Microsoft Access External Data 1 28th Mar 2007 02:01 AM
import dll c++ function =?Utf-8?B?Y2VudHJpbm8=?= Microsoft C# .NET 7 11th May 2005 08:31 AM
Import .Net DLL Function Mythran Microsoft VB .NET 1 10th Nov 2004 09:37 AM
Function to import Mike Comtois Microsoft Access VBA Modules 0 22nd Jul 2004 05:25 PM
Re: When I Import an Access Table With an Excel Function in a Cell it Displays as Text not as a Function in Excel Niek Otten Microsoft Excel Programming 2 18th Sep 2003 03:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:36 PM.