PC Review


Reply
Thread Tools Rate Thread

what could cause this "native exception" error

 
 
rocio
Guest
Posts: n/a
 
      11th Nov 2003
I am developing in .NET CF, of course, for the PocketPC
But I'm importing a DLL created in embedded C++ using PInvoke. This DLL is for the VEO Photo Traveler camera:

Declare Function CamOpen Lib "veocamapi.dll" (ByRef hCam as IntPtr) as CAM_ERRORS

Dim hCam as IntPtr
Dim err as CAM_ERRORS
Try
err = CamOpen(hCam)
catch ......
:
The program crashes at the statement err = CamOpen(hCam), does not even get to the catch statement where I could my customized error messages.
The error it throws says:

A native exception occurred.

ExceptionCode: 0xc0000005
ExceptionAddress: 0x016d6d48
Writing: 0x20000000

Note however, that this error happens when the VEO camera is connected to the PPC. If it is not connected, the function CanOpen returns a err value of "camera is not connected", which is fine of course.
When I connect the camera to the PPC I make sure it is working correctly, then I close the application completely before trying my code.

The VEO Photo Traveler SDK also comes with a source code in embedded C++, and a compiled program that uses this DLL.
(I do not know C++, much less do not have the SDK to run this source code, but I looked at some of the .cpp files to get an idea on how the DLL functions are called).
I copied this program, a .exe file into my PPC and run it with no problems. If I delete the DLL from the PPC, then this program cannot run and tells me nicely that files are missing for it to execute (veocamapi.dll). So if I thought that it is the DLL with the problem, it is not, since this .exe program can access it with no problems. Furthermore, I can access the DLL when the camera is not connected to the PPC, it just crashes when the camera is connected. But I tested the camera when it is connecetd and it functions normally.

Your thoughts/ideas on what could be wrong, or what in general throws a native exception will be very appreciated.



 
Reply With Quote
 
 
 
 
Joe Audette
Guest
Posts: n/a
 
      11th Nov 2003
a native exception just means the error occurred in
unmanged code such as your dll rather than in code managed
by the common language runtime.

>-----Original Message-----
>I am developing in .NET CF, of course, for the PocketPC
>But I'm importing a DLL created in embedded C++ using

PInvoke. This DLL is for the VEO Photo Traveler camera:
>
> Declare Function CamOpen Lib "veocamapi.dll" (ByRef

hCam as IntPtr) as CAM_ERRORS
>
> Dim hCam as IntPtr
> Dim err as CAM_ERRORS
> Try
> err = CamOpen(hCam)
> catch ......
> :
>The program crashes at the statement err = CamOpen

(hCam), does not even get to the catch statement where I
could my customized error messages.
>The error it throws says:
>
> A native exception occurred.
>
> ExceptionCode: 0xc0000005
> ExceptionAddress: 0x016d6d48
> Writing: 0x20000000
>
>Note however, that this error happens when the VEO camera

is connected to the PPC. If it is not connected, the
function CanOpen returns a err value of "camera is not
connected", which is fine of course.
>When I connect the camera to the PPC I make sure it is

working correctly, then I close the application completely
before trying my code.
>
>The VEO Photo Traveler SDK also comes with a source code

in embedded C++, and a compiled program that uses this DLL.
>(I do not know C++, much less do not have the SDK to run

this source code, but I looked at some of the .cpp files
to get an idea on how the DLL functions are called).
>I copied this program, a .exe file into my PPC and run it

with no problems. If I delete the DLL from the PPC, then
this program cannot run and tells me nicely that files are
missing for it to execute (veocamapi.dll). So if I
thought that it is the DLL with the problem, it is not,
since this .exe program can access it with no problems.
Furthermore, I can access the DLL when the camera is not
connected to the PPC, it just crashes when the camera is
connected. But I tested the camera when it is connecetd
and it functions normally.
>
>Your thoughts/ideas on what could be wrong, or what in

general throws a native exception will be very appreciated.
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why "Application has generated an exception" error and not a good error message? Samuel R. Neff Microsoft VB .NET 1 5th Apr 2005 08:35 AM
unexpected exception has been detected in native code outside the VM. "espn" tj Windows XP Internet Explorer 0 1st Feb 2004 05:16 PM
How to distinguish a "communications failure" exception from a "sql syntax" (and the like) exception ? Olivier R Microsoft ADO .NET 1 25th Nov 2003 03:00 PM
Manual "Windows Update" produces "ActiveX/active scripting" error message even with "LOW" security level setting in "Trusted" Zone Ray2 Windows XP Help 1 14th Nov 2003 06:50 PM
How to Catch "Unhandled exception" for a "file or assembly not found" error? Erialc Berts Microsoft C# .NET 1 3rd Nov 2003 03:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:51 AM.