473,378 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

best bet for using a .NET dll

I'd like to make a simple program that uses the Canon digital camera
SDK (EDSDK 1.3). Basically I need to take pictures and download them
to my computer. They have a fair amount of example code for the .NET
languages, and don't officially support anything else.

The API uses more than the basic c types (references, etc.) that I'm
not totally familiar with yet. Included at the bottom is an example
of one of the functions.

What is my best bet for writing this in Python? cTypes, IronPython,
something else? I haven't worked with either before but am currently
reading up. It seams cTypes has a difficult time dealing with
anything but the 'normal' c types, is this correct?

Would it be easier to just write a program in C# to handle all of the
fancy types? (ie. make a function that opens and closes session, finds
camera, takes picture, downloads picture, saves picture - that can
then be read in python) ? This isn't a very attractive option to me.

Thanks in advance for any insight.


3.1.24 EdsDownload

Description:
Downloads a file on a remote camera (in the camera memory or on a
memory card) to the host computer. The downloaded file is sent
directly to a file stream created in advance.
When dividing the file being retrieved, call this API repeatedly. Also
in this case, make the data block size a multiple of 512 (bytes),
excluding the final block.

Syntax
EdsError EDSAPI EdsDownload( EdsDirectoryItemRef inDirItemRef,
EdsUInt32 inReadSize,
EdsStreamRef outStreamRef )

Parameters
inDirItemRef
Designate the file object in the camera to download.
inReadSize
Designate the size in bytes to download.
outStreamRef
Specifies the destination stream. The stream for downloading is
created by means of EdsCreateFileStream, EdsCreateMemoryStream, or the
like.

Return Values
Returns EDS_ERR_OK if successful. In other cases, see the EDS Error Lists.
Nov 21 '06 #1
2 3359

Warren Jackson wrote:
I'd like to make a simple program that uses the Canon digital camera
SDK (EDSDK 1.3). Basically I need to take pictures and download them
to my computer. They have a fair amount of example code for the .NET
languages, and don't officially support anything else.

The API uses more than the basic c types (references, etc.) that I'm
not totally familiar with yet. Included at the bottom is an example
of one of the functions.

What is my best bet for writing this in Python? cTypes, IronPython,
something else? I haven't worked with either before but am currently
reading up. It seams cTypes has a difficult time dealing with
anything but the 'normal' c types, is this correct?

Would it be easier to just write a program in C# to handle all of the
fancy types? (ie. make a function that opens and closes session, finds
camera, takes picture, downloads picture, saves picture - that can
then be read in python) ? This isn't a very attractive option to me.

Thanks in advance for any insight.


3.1.24 EdsDownload

Description:
Downloads a file on a remote camera (in the camera memory or on a
memory card) to the host computer. The downloaded file is sent
directly to a file stream created in advance.
When dividing the file being retrieved, call this API repeatedly. Also
in this case, make the data block size a multiple of 512 (bytes),
excluding the final block.

Syntax
EdsError EDSAPI EdsDownload( EdsDirectoryItemRef inDirItemRef,
EdsUInt32 inReadSize,
EdsStreamRef outStreamRef )

Parameters
inDirItemRef
Designate the file object in the camera to download.
inReadSize
Designate the size in bytes to download.
outStreamRef
Specifies the destination stream. The stream for downloading is
created by means of EdsCreateFileStream, EdsCreateMemoryStream, or the
like.

Return Values
Returns EDS_ERR_OK if successful. In other cases, see the EDS Error Lists.
There is also "Python for .Net", which is simply a bridge (as opposed
to IronPython, which is a complete python implementation). It works
pretty well.

Nov 21 '06 #2

Warren Jackson wrote:
I'd like to make a simple program that uses the Canon digital camera
SDK (EDSDK 1.3). Basically I need to take pictures and download them
to my computer. They have a fair amount of example code for the .NET
languages, and don't officially support anything else.

The API uses more than the basic c types (references, etc.) that I'm
not totally familiar with yet. Included at the bottom is an example
of one of the functions.

What is my best bet for writing this in Python? cTypes, IronPython,
something else? I haven't worked with either before but am currently
reading up. It seams cTypes has a difficult time dealing with
anything but the 'normal' c types, is this correct?

Would it be easier to just write a program in C# to handle all of the
fancy types? (ie. make a function that opens and closes session, finds
camera, takes picture, downloads picture, saves picture - that can
then be read in python) ? This isn't a very attractive option to me.

Thanks in advance for any insight.
This sounds like the sort of thing for which IronPython is ideal. It
should eliminate the need for C# unless you have to mark classes with
attributes (In which case you should be able to get away with a stub
class.)

Fuzzyman
http://www.voidspace.org.uk/index2.shtml

Nov 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: Frank | last post by:
What is the best IDE for developing PHP applications? What do you use and why? Thanks.
5
by: great_googley_moogley | last post by:
Greetings, I am in the process of installing a SQL database at a customer location. I have determined that there are 3 ways to do this, and I wanted to know which is the best of the 3. 1...
131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
3
by: xzzy | last post by:
I was wondering why we have to have using System.Data using System.Configuration using etc.... why are they not all lumped into one 'using'? In other words, is there a best way to use...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
14
by: Jon Rea | last post by:
I am currently cleaning up an application which was origainlly hashed together with speed of coding in mind and therefore contains quite a few "hacky" shortcuts. As part of this "revamping"...
4
by: Ned Balzer | last post by:
Hi all, I am pretty new to asp.net; I've done lots of classic asp, but am just beginning to get my mind wrapped around .net. What I'd like to do is include some code that tests if a user is...
2
yashg
by: yashg | last post by:
I am building a data backup application in C# using Sockets. It has a server component and a client component. The client is going to upload files to the server through TCP sockets. I've got all...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.