Click here to Skip to main content
15,886,835 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: problem in using library of LFSR Pin
jschell13-Mar-11 10:14
jschell13-Mar-11 10:14 
QuestionProblems using managed C++ DLL's on WinXP and Win2003 Pin
Ole Morten Heien10-Mar-11 21:36
Ole Morten Heien10-Mar-11 21:36 
AnswerRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
Richard MacCutchan10-Mar-11 22:48
mveRichard MacCutchan10-Mar-11 22:48 
GeneralRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
Ole Morten Heien10-Mar-11 22:55
Ole Morten Heien10-Mar-11 22:55 
GeneralRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
Richard MacCutchan10-Mar-11 23:46
mveRichard MacCutchan10-Mar-11 23:46 
GeneralRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
Ole Morten Heien11-Mar-11 0:13
Ole Morten Heien11-Mar-11 0:13 
GeneralRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
Richard MacCutchan11-Mar-11 0:19
mveRichard MacCutchan11-Mar-11 0:19 
GeneralRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
Ole Morten Heien11-Mar-11 0:37
Ole Morten Heien11-Mar-11 0:37 
I havent?

--------------------------------------------------------------
Anyway, her's the situation:
We have a Win32 application written in Clarion for Windows. This dev tool produces standard Win32 binary similar to C++. The Clarion Compiler is actually a C++ compiler as well as compiling Clarion code so the result is the same
We allso have a large .NET library we want to utilize in this Clarion software. But since Clarion is not .NET compatible or is able to compile managed code, I had to figure out what to do. The answer was quiet simple actually. C++/CLI was what I was looking for. I then created a small C++ DLL that wrapped my .NET library. This works perfectly and everyone is smiling......until we installed the software on our Windows 2003 Terminal server..... DANG!! Error 0XC0000005!! The Error shows at loading time, before any code is started at all. And of colurse, both FW4 and VC100 is installed...
---------------------------------------------------------------

As I said here: "The error shows at loading time", hence, no code is started yet. Let me explain the flow in my program:

App.EXE starts:
All DLL's are loaded by the OS. This I know becuase if some DLL's of mine is missing I will be told.
Next, the program do lots of initialization of databases and stuff and User is presented a Login dialog
User loggs in. I then checks the settings for this user if he/her has a license to use my .NET components. If the user have this license, the API in the DLL is called and presents the user with a GUI created in C#

Now, since the absolutly first call to my C++ DLL is done AFTER the login, then I am pretty sure no code has run in front of the error.

An argument against this would of course be if the C++ DLL had some constructors of any kind that would be started when the DLL is loaded, but it has none. And of course, if it DID have one, dont you think the error would have shown regardless of the OS?

I am 99% certain that the error is in some missing components in the OS and 1% certain that ther might be a switch setting in my C++ project that is wrong. I must admit, I have NO knowledge of how C++ works. This is my absolute first project in C++ and it contains nearly nothing, other than ONE abstract class (the interface) and one class that inherits the interface. When I call the API I send in a Clarion Interface, wich is binary compatible with an abstract class in C++. Then I instantiate my wrapper class. I then return the interface of the C++ class. This interface has methods that will call the .NET components. This works 100% nive in Win7 and Win2008. Since the problem ONLY appears on WinXP and WIn2003 it tells me that something is missing
My first thought was that the framework was not complete or maybe there was something with the VC100 runtime, but I cant see any missing parts. I know for a fact that running a .NET 4 program on a computer with no framework will result in 0xC0000005 message, just like my problem so therfore I'm 99% certain of the missing parts in the OS

You can test this wery easly. Just create a .NET project with FW4 and try running this on a FW2.0 computer. There are no FW version check at all. Just the error message....
-----------------------------
Ole Morten Heien
HD Software / Advisor AS
-----------------------------

GeneralRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
John Schroedl11-Mar-11 3:22
professionalJohn Schroedl11-Mar-11 3:22 
GeneralRe: Problems using managed C++ DLL's on WinXP and Win2003 Pin
Ole Morten Heien11-Mar-11 3:32
Ole Morten Heien11-Mar-11 3:32 
QuestionContextMenuStrip Pin
Milton N10-Mar-11 15:50
Milton N10-Mar-11 15:50 
QuestionCreating XML file from C++/CLI code [modified] Pin
pix_programmer10-Mar-11 0:56
pix_programmer10-Mar-11 0:56 
AnswerRe: Creating XML file from C++/CLI code Pin
Richard MacCutchan10-Mar-11 3:35
mveRichard MacCutchan10-Mar-11 3:35 
AnswerRe: Creating XML file from C++/CLI code Pin
Ger Hayden10-Mar-11 9:25
Ger Hayden10-Mar-11 9:25 
QuestionRe: Creating XML file from C++/CLI code Pin
pix_programmer10-Mar-11 23:07
pix_programmer10-Mar-11 23:07 
AnswerRe: Creating XML file from C++/CLI code Pin
Ger Hayden11-Mar-11 8:11
Ger Hayden11-Mar-11 8:11 
Questionget client's screen size Pin
fzerd9-Mar-11 20:08
fzerd9-Mar-11 20:08 
AnswerRe: get client's screen size Pin
Richard MacCutchan9-Mar-11 22:21
mveRichard MacCutchan9-Mar-11 22:21 
AnswerRe: get client's screen size Pin
John Schroedl10-Mar-11 3:31
professionalJohn Schroedl10-Mar-11 3:31 
GeneralRe: get client's screen size Pin
fzerd10-Mar-11 4:26
fzerd10-Mar-11 4:26 
GeneralRe: get client's screen size Pin
John Schroedl10-Mar-11 5:17
professionalJohn Schroedl10-Mar-11 5:17 
GeneralRe: get client's screen size Pin
fzerd10-Mar-11 5:34
fzerd10-Mar-11 5:34 
GeneralRe: get client's screen size Pin
John Schroedl10-Mar-11 8:15
professionalJohn Schroedl10-Mar-11 8:15 
GeneralRe: get client's screen size Pin
Richard MacCutchan10-Mar-11 5:34
mveRichard MacCutchan10-Mar-11 5:34 
GeneralRe: get client's screen size Pin
fzerd10-Mar-11 6:01
fzerd10-Mar-11 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.