Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Unaxcepted behaviour of IXMLDOMDocument2Ptr in C++ and C#

$
0
0

Hi All,

I have a doubt on CPP and C# Applications running on Windows Embedded Compact-7.
I am loading a library in c++ as
    
hNWLib = LoadLibrary(L"Sample.dll");
SampleFunc= (PFN_SampleFunc)GetProcAddress(hNWLib, L"SampleFunc");

SampleFunc();

And inside the Sample.dll in "SampleFunc()" function am accessing "DOMDOCUMENTPTR" class as follows

MSXML2::IXMLDOMDocument2Ptr  doc;
MSXML2::IXMLDOMElementPtr    root;

while am accessing any of the method inside "doc" object, as like "doc->async" or "doc->appendChild" it through exception on sample application as

Exception 'Raised Exception' (0xe06d7363): Thread-Id=075601c6(pth=a34d53b8), Proc-Id=078b022a(pprc=a34d5d20) 'SAMPLE_APP.EXE',
VM-active=078b022a(pprc=a34d5d20) 'SAMPLE_APP.EXE'
PC=400513f4(coredll.dll+0x000413f4) RA=81037648(kernel.dll+0x0000e648) SP=0002fa1c, BVA=0002fa50

And the unexpected thing is, When i created a sample C# application and loads the DLL as

[DllImport("Sample.dll", SetLastError = true)]
private static unsafe extern UInt32 SampleFunc();

SampleFunc();

It's working without any issue. It is creating "MSXML2::IXMLDOMDocument2Ptr" object and working fine.

So i have some doubts regarding above trials.

Why this different behaviour in C++ and C# application with same implementation??
    (As my understanding there might not be any problem in loading the library and accessing the "SampleFunc()")
Is there have any issue regarding accessing mechanism of "MSXML2::IXMLDOMDocument2Ptr" class in C++ and C#??
    (Already including the needed xml library)
Is there have any application permission kind of things??
    (As my knowledge there is no application permissions in WEC7)

Actually i am confused with this unexpected behavior. Can anyone help me to find the reason... 

Thanks and Regards
ASWIN PP


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>