LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel_GetProperty "missing prototype"?

I am beginning to setup a CVI project that will write data to multiple Excel worksheets. I am reviewing the "excel2000dem.prj".

I am running Office 2000 on Windows 2k with Measurement Studio 6. I have loaded the Microsoft Excel 9.0 Object Library with the Create ActiveX Controller wizard.

My approach is to execute the following methods in the following order:
- Excel_NewApp (works)
- Excel_AppsetVisible (works, opens Excel)
- Excel_GetProperty to Get Workbooks as done in sample

I am stuck with the Excel_GetProperty method. I get an error that the prototype is missing. I have included the .h file created with the .fp file in my source file. I can run the sample project just fine, what may I have missing in my project?


Thanks,
Aaron
0 Kudos
Message 1 of 3
(3,334 Views)
After consulting with a colleague, we found that the setup of the ActiveX Controller was the issue. When setting up the controller we chose "Compatability Options" and changed the "Property Access Functions" from "Per Property" to "Per Server". The resulting ActiveX Library contained the Excel_GetProperty method and matched the "excel2000.fp" library of the NI sample.

Can anyone point me towards some information on setting the ActiveX Controller? I would like to understand this better.

Thanks.
Message 2 of 3
(3,334 Views)
Hello

The missing prototype was due to fact that the function you were hoping to use was not generated by the activex wizard. When generating the Activex controller code using the wizard, if you click on the "Compatibility Options" button, the window describes the kinds of functions that will be generated by the wizard, based on the compatibility mode that you choose. So as in "per server" mode, the wizard generates single GetProperty() and SetProperty() functions thru which you can set and get the properties for all the objects of the server. The example seemed to have used that mode. The choice between these various modes has to to with compatibility with previous instrument drivers and with the interfaces the activex control/server supports. For more
information, open up the CVI online help and in the index paste Create ActiveX Controller, Advanced Options

I hope this explains things

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
Message 3 of 3
(3,334 Views)