Camera Hacker

:

Add Comment | Related Links | TrackBack
Related Content

different image file names

I have been trying to use code to take a string entered by the user and put it into the file name of the image something like this

CString filenamez=strcat("C:\directorywhatever\",strByUser);
filenamez=strcat(filenamez,".jpg");

err = EdsCreateFileStream(filenamez,kEdsFileCreateDisposition_CreateAlways, kEdsAccess_ReadWrite, &stream);

however this isn't working and gives me strange errors when i take the picture from the UI any thoughts?

syg19
Tue, 15 Jun 2010 12:30:53 +0000

Unhandled exception at 0x0052bb7d in CameraControl.exe: 0xC0000005: Access violation reading location 0x00000020.

is the error

syg19
Tue, 15 Jun 2010 12:52:11 +0000

I'm guessing that the EdsCreateFileStream function couldn't write the stream and threw an exception due to a number of possible reasons:

  1. directory doesn't exist
  2. no write permission
  3. ran out of disk space
  4. file name contains illegal characters
  5. stream is null

It's too bad the error message isn't very helpful. Is it possible to catch the exception and read out the exact error message from the exception? That will probably pin-point to the exact problem.

Chieh Cheng
Tue, 15 Jun 2010 14:17:27 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 0 + 1?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.