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

Managed C++/CLI

 
GeneralRe: PostMessage - WTF?! Pin
john john mackey18-Jul-07 10:53
john john mackey18-Jul-07 10:53 
AnswerRe: PostMessage - WTF?! Pin
john john mackey18-Jul-07 11:18
john john mackey18-Jul-07 11:18 
GeneralRe: PostMessage - WTF?! Pin
Mark Salsbery18-Jul-07 14:39
Mark Salsbery18-Jul-07 14:39 
GeneralRe: PostMessage - WTF?! Pin
john john mackey21-Jul-07 16:35
john john mackey21-Jul-07 16:35 
GeneralRe: PostMessage - WTF?! Pin
Mark Salsbery21-Jul-07 19:23
Mark Salsbery21-Jul-07 19:23 
AnswerRe: PostMessage - WTF?! Pin
Luc Pattyn20-Jul-07 16:28
sitebuilderLuc Pattyn20-Jul-07 16:28 
GeneralRe: PostMessage - WTF?! Pin
john john mackey21-Jul-07 16:37
john john mackey21-Jul-07 16:37 
QuestionDynamically loading a mixed-mode dll from a network path Pin
mav.northwind18-Jul-07 3:45
mav.northwind18-Jul-07 3:45 
Hi folks!
This could become a bit lengthy, sorry in advance...

I have created a mixed-mode dll (managed+unmanaged C++, .NET 1.1) that implements a given (unmanaged) C++ interface.
Inside this dll I use some objects from C# assemblies located in the same path as the mixed-mode-dll.

So far, so good, everything works as expected when my dll is loaded into a 3rd-party-application from a local directory (using LoadLibrary() I guess. I can't look into the other app, but I don't see a different way...).
When I put the dll on a network share and have the 3rd-party-app load my dll from there, I get an error 1114 (A dynamic link library (DLL) initialization routine failed).
When I set CAS policies to FullTrust for the network share, the dll can be loaded correctly.

Because our customers usually forget to adjust CAS accordingly and wonder why the 3rd-party application shows an error trying to load our dll, I thought I'd include some security-related checks before trying anything fancy and show a nice info dialog telling the user to adjust CAS if any of these checks fail.

Now the problem is that I can't find a place to put these checks.
Even when I just put an AfxMessageBox() as the very first statement in the very first interface function that's getting called, this message box doesn't show but the 3rd-party-app still gives error 1114 Cry | :((

It seems as if there's a problem with loading a depending dll/assembly, but I simply cannot find what's going on. There's nothing in the fusion log for this case, either. "Regular" C#-applications write to the fusion log, but when my dll is loaded, the fusion log seems to completely ignore the fact that assemblies have to be found - no entries whatsoever, even after setting ForceLog to true in the corresponding Fusion registry key.

Can anyone offer an idea why .NET behaves like that or what I could try to diagnose the problem?

Thanks in advance,
mav

--
Black holes are the places where God divided by 0...

AnswerRe: Dynamically loading a mixed-mode dll from a network path Pin
led mike18-Jul-07 6:52
led mike18-Jul-07 6:52 
GeneralRe: Dynamically loading a mixed-mode dll from a network path Pin
mav.northwind18-Jul-07 7:47
mav.northwind18-Jul-07 7:47 
QuestionFunctions equivalent in C++ Pin
C#Coudou17-Jul-07 16:23
C#Coudou17-Jul-07 16:23 
AnswerRe: Functions equivalent in C++ Pin
Mark Salsbery17-Jul-07 17:38
Mark Salsbery17-Jul-07 17:38 
AnswerRe: Functions equivalent in C++ Pin
Mark Salsbery18-Jul-07 9:30
Mark Salsbery18-Jul-07 9:30 
AnswerRe: Functions equivalent in C++ Pin
Dave Doknjas18-Jul-07 14:06
Dave Doknjas18-Jul-07 14:06 
GeneralRe: Functions equivalent in C++ Pin
C#Coudou22-Jul-07 19:16
C#Coudou22-Jul-07 19:16 
QuestionPath/String modification Pin
BuckBrown17-Jul-07 13:20
BuckBrown17-Jul-07 13:20 
AnswerRe: Path/String modification Pin
Luc Pattyn17-Jul-07 13:40
sitebuilderLuc Pattyn17-Jul-07 13:40 
GeneralRe: Path/String modification Pin
BuckBrown18-Jul-07 9:07
BuckBrown18-Jul-07 9:07 
GeneralRe: Path/String modification Pin
Luc Pattyn18-Jul-07 9:13
sitebuilderLuc Pattyn18-Jul-07 9:13 
AnswerRe: Path/String modification Pin
George L. Jackson17-Jul-07 13:53
George L. Jackson17-Jul-07 13:53 
Questionproblem in creating Dynamic Array library Pin
thdeofju17-Jul-07 8:14
thdeofju17-Jul-07 8:14 
AnswerRe: problem in creating Dynamic Array library Pin
Mark Salsbery17-Jul-07 8:32
Mark Salsbery17-Jul-07 8:32 
Question[C++/CLI]:impor huge file into memory Pin
ffgtrg1616g261217-Jul-07 7:21
ffgtrg1616g261217-Jul-07 7:21 
QuestionRe: [C++/CLI]:impor huge file into memory Pin
Mark Salsbery17-Jul-07 7:50
Mark Salsbery17-Jul-07 7:50 
AnswerRe: [C++/CLI]:impor huge file into memory Pin
ffgtrg1616g261217-Jul-07 11:08
ffgtrg1616g261217-Jul-07 11:08 

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.