473,414 Members | 1,723 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,414 software developers and data experts.

Calling native code from .Net

I call native code from my .net app
<DllImport(SENDFORMPDFTest, EntryPoint:="FORMEXIST", _
SetLastError:=True, CharSet:=CharSet.Ansi, _
ExactSpelling:=True, _
CallingConvention:=CallingConvention.Winapi)_
The DLL works fine on localhost and production, but hangs on my test server.
Localhost and and test server has a new revision. We tried to put a log file
into the DLL, but nothing gets written to the logfile.
How can I trouble shoot this problem?
--
Arne Garvander
Certified Geek
Professional Data Dude
Feb 11 '08 #1
2 1549
you want windbg and the sos.dll. see

http://msdn2.microsoft.com/en-us/library/ms954594.aspx
-- bruce (sqlwork.com)
"Arne Garvander" wrote:
I call native code from my .net app
<DllImport(SENDFORMPDFTest, EntryPoint:="FORMEXIST", _
SetLastError:=True, CharSet:=CharSet.Ansi, _
ExactSpelling:=True, _
CallingConvention:=CallingConvention.Winapi)_
The DLL works fine on localhost and production, but hangs on my test server.
Localhost and and test server has a new revision. We tried to put a log file
into the DLL, but nothing gets written to the logfile.
How can I trouble shoot this problem?
--
Arne Garvander
Certified Geek
Professional Data Dude
Feb 11 '08 #2
My DLL needed a dependent DLL that could not be found.
I relinked my DLL with static linking to the dependent DLL. That solved my
problem.
--
Arne Garvander
Certified Geek
Professional Data Dude
"bruce barker" wrote:
you want windbg and the sos.dll. see

http://msdn2.microsoft.com/en-us/library/ms954594.aspx
-- bruce (sqlwork.com)
"Arne Garvander" wrote:
I call native code from my .net app
<DllImport(SENDFORMPDFTest, EntryPoint:="FORMEXIST", _
SetLastError:=True, CharSet:=CharSet.Ansi, _
ExactSpelling:=True, _
CallingConvention:=CallingConvention.Winapi)_
The DLL works fine on localhost and production, but hangs on my test server.
Localhost and and test server has a new revision. We tried to put a log file
into the DLL, but nothing gets written to the logfile.
How can I trouble shoot this problem?
--
Arne Garvander
Certified Geek
Professional Data Dude
Feb 11 '08 #3

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

Similar topics

2
by: Peter Schmitz | last post by:
Hi, I just created a solution that is based on unmanaged C++ code. Now, the .net framework consists of some cool functions and classes - there is especially one namespace I'd like to use....
14
by: ericellsworth | last post by:
Hi, I'm trying to use a class to pass variables back and forth from a form opened in dialog mode. I have created a class which invokes a form in its show method, like so: Public Sub Show() '...
2
by: Pawan Aggarwal | last post by:
I'm having trouble with calling an exported function in a native DLL compiled with eMbedded Visual C++ in C# application in PocketPC 2002 OS. Problem Description follows: I have one exported...
5
by: Virajitha Sarma | last post by:
Hi, Can u plz help me out with how to call a C# DLL from C... I tried to find out by searching in net..but i couldnot find anything on it.... Thanku Virajitha *** Sent via Developersdex...
1
by: Paul Brun | last post by:
Hi guys, I get the following error during runtime: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at SXInit(Int32 ) The SXInit...
4
by: Tim Menninger | last post by:
Just started working on this and have not found any real good resources out there. We have a lot of native C++ Dll code that we use for our app. We want to share the code so that C# ASP.net code...
10
by: Gustavo L. Fabro | last post by:
Greetings! I've been porting an application for Builder to VS .NET 2003 and searching for possible bottlenecks (the application is currently running slow). I found out one scenario that takes a...
1
by: Bern McCarty | last post by:
What do you make of this? I cannot tell for sure but it almost seems as the the transition thunk to get back from the native bool method to the managed caller is looking at eax and, if any bit is...
1
by: H.B. | last post by:
Hi, I need to make a function that can display data on my Managed C++ app and be called by an unmanaged C++ DLL. Something like : void Form1::Form1_Load(System::Object * sender,...
2
by: Dave Burns | last post by:
Hello, We have a situation where a managed C++ assembly links with native C++ dll. There is a callback mechanism which calls back into the managed code asynchronously. Since native classes...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.