@leevy wrote:
Hello.
I will control a digital camera (Canon Power Shot A620) with PRSDK.dll in LabVIEW. But I can't get the device informations with the 'PR_GetDeviceList' functions. Who can tole me the reason? Thanks.
There are PRSDK.DLL, .h files and my vi in the attachment.
Leevy
email:
leevy@263.netMSN:
gdliwei@263.net
LabVIEW arrays are NOT and I mean NOT C string pointers!!!!!
Therefore you can't construct a cluster containing arrays to pass to a function that expects C string pointers. Also your function does not expect C string pointers but embedded constant sized C string arrays. This is something you can sort of create by creating a correctly sized array first, convert that to a cluster where the cluster size option has been set correctly and then add that cluster into the top level cluster.
The pBufferSize parameter is most likely not the number of records you enter in but instead the number of bytes your pointer (cluster) provides. Calculating that is an interesting exercise in understanding C datatypes.
All in all you are in an interesting learning experience that will lead you down the road of understanding C datatypes and C specific details. If you want to do that together with the inevitable crashes or exception messages is up to you. Another approach would be to buy a ready made toolkit such as
here. Mention that you need support for the PRSDK as Canon has various different SDKs for different camera models.
Rolf Kalbermatter
Message Edited by rolfk on
01-09-2008 03:03 PM