AnsweredAssumed Answered

vrf Passing pointers to DLL (written in C)

Question asked by VRFuser on Mar 14, 2004
Latest reply on Mar 31, 2004 by VRFuser
Sorry, I should have made it clearer.
The dll queries the UUT and uses the pointer to point to the result.
I'm wanting to pass the results back to VEE.
Some of the functions get more than one result.

Best regards
Hamish C. Begg
Pre-Compliance & Certification
------------------------------------
Powerware, 39 Princess St, PO Box 11-188
Christchurch 8030, New Zealand
Phone: (++64) 3 343-3314, Fax: (++64) 3 343-5100
Email: hamish.begg@powerware.com
Website: http://www.powerware.com

If you received this in error, please contact the sender and delete the
material from any computer. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited.
----- Forwarded by Hamish Begg/Christchurch/NZ/EnergySystems/PSD on
15/03/04 08:23 -----
                                                                                                                                
                    "Zafer SAVAS"                                                                                               
                    <zsavas@asels        To:     VRF <vrf@agilent.com>                                                          
                    an.com.tr>           cc:                                                                                    
                                         Subject:     [vrf] Re: Passing pointers to DLL (written in C)                          
                    12/03/04                                                                                                    
                    21:39                                                                                                       
                    Please                                                                                                      
                    respond to                                                                                                  
                    "Zafer SAVAS"                                                                                               
                                                                                                                                
                                                                                                                                




Actually i see no problem while passing more if you can pass one.
Here is a sample code i wrote for VEE that needs two input parameters
(double pointers);

extern "C" __declspec(dllexport) double GetVoltage(double* Ref1, double*
Ref2, int Ref3)
{
    return (*Ref1)*(*Ref2)+(double)Ref3;
}

No problem while passing Real64 values to this function in VEE.
Was that your problem or i misunderstood something?

Regards.

Zafer SAVAS
Test Engineer
Microwave & System Technologies Division
Aselsan Inc./ TURKEY


----- Original Message -----
From: <Hamish.Begg@Powerware.com>
To: "VRF" <vrf@agilent.com>
Sent: Friday, March 12, 2004 2:47 AM
Subject: [vrf] Passing pointers to DLL (written in C)


> Hi All,
> I am using an inhouse written DLL, to communicate with the UUT directly.
> The dll was written in C and uses pointers to pass information.
> eg fail DLLH GetVoltage (short hDevice, double *Voltage)   to get the
> devices internal measurement of its voltage.
> Since I have no idea how to pass a pointer, I have created my own dlls to
> return a variable to VEE. This is fine if the function is only returning
> one pointer.
> And unlike most things I write, it worked first time.
>
> However some of the functions I want to use, pass more than one variable.
> eg fail DLLH GetTemperature (short hDevice, double *TempSense_1, double
> *TempSense_2)
> Is there a way that I can pass pointers in VEE to a DLL?
>
>
>
>
> Best regards
> Hamish C. Begg
> Pre-Compliance & Certification
> ------------------------------------
> Powerware, 39 Princess St, PO Box 11-188
> Christchurch 8030, New Zealand
> Phone: (++64) 3 343-3314, Fax: (++64) 3 343-5100
> Email: hamish.begg@powerware.com
> Website: http://www.powerware.com
>
> If you received this in error, please contact the sender and delete the
> material from any computer. Any review, retransmission, dissemination or
> other use of, or taking of any action in reliance upon, this information
by
> persons or entities other than the intended recipient is prohibited.
>
>
> ---
> You are currently subscribed to vrf as: zsavas@aselsan.com.tr
> To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
> To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list,  email "vrf@agilent.com".
> If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".


################################################################################################

Dikkat:

Bu elektronik posta mesaji kisisel ve ozeldir. Eger size gonderilmediyse
lutfen gondericiyi
bilgilendirip mesaji siliniz. Firmamiza gelen ve giden mesajlar virus
taramasindan gecirilmekte,
guvenlik nedeni ile kontrol edilerek saklanmaktadir. Mesajdaki gorusler ve
bakis acisi
gondericiye ait olup Aselsan A.S. resmi gorusu olmak zorunda degildir.

################################################################################################

Attention:

This e-mail message is privileged and confidential. If you are not the
intended recipient please
delete the message and notify the sender. E-mails to and from the company
are monitored for
operational reasons and in accordance with lawful business practices. Any
views or opinions
presented are solely those of the author and do not necessarily represent
the views of the company.

################################################################################################


---
You are currently subscribed to vrf as: Hamish.Begg@Powerware.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".




---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes