Tools for Windows programming

A Forum for free software.

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: msxml6.dll
PostPosted: 08 Mar 2017 05:09 
Offline
User avatar

Joined: 07 Feb 2015 00:48
Posts: 148
Location: Louisville KY USA
Hi Dave,

I kinda figured you would be on windows 7 :)

I will look at why you cannot debug this...

David


Top
 Profile  
 
 Post subject: Re: msxml6.dll
PostPosted: 08 Mar 2017 05:54 
Offline
User avatar

Joined: 07 Feb 2015 00:48
Posts: 148
Location: Louisville KY USA
Hi Dave,

I have a question for you. When you tried to use the refid, did you use the IID_ variable or did you attempt to use __uuidof() ? __uuidof wouldn't work here... I think I need to fix the headers regardless so that __uuidof() will work here as well, just wondering if maybe that is the issue?

David


Top
 Profile  
 
 Post subject: Re: msxml6.dll
PostPosted: 10 Mar 2017 04:49 
Offline

Joined: 19 Jan 2017 03:36
Posts: 8
Hi David,

LADSoft wrote:
I have a question for you. When you tried to use the refid, did you use the IID_ variable or did you attempt to use __uuidof() ?

Yes, I am using __uuidof for the refid.
LADSoft wrote:
__uuidof wouldn't work here... I think I need to fix the headers regardless so that __uuidof() will work here as well, just wondering if maybe that is the issue?

I see, currently I initialize the COM instance as the same way as in msxml tutorial:
Code:
    hr = CoCreateInstance(__uuidof(DOMDocument60), NULL, CLSCTX_INPROC_SERVER,
                          __uuidof(IxmlDomDocument), (void **)doc_ptr2ptr);

Correct me if I'm wrong, instead of using __uuidof on the current OCC version, I would replace the first argument with CLSID_DOMDocument60 and the fourth argument with IID_IXMLDOMDocument?
But if I do that there would be compile errors. What should I use instead?

-dave


Top
 Profile  
 
 Post subject: Re: msxml6.dll
PostPosted: 10 Mar 2017 06:04 
Offline
User avatar

Joined: 07 Feb 2015 00:48
Posts: 148
Location: Louisville KY USA
Hi Dave,

I didn't realize a lot of things about COM when I wrote the header.

I support __uuidof for the CLSID but not for the REFIID at present... and I support the IID_ constants for the REFIID but not the CLSID_ constants for the CLSID. So it is kind of a hard to understand mix and match.

I will just fix it so that __uuidof works as expected for the refiids. While I'm at it I'll add the CLSID constants. That way people can go either way with it...

I'll be working on this and your issue with the debugger over this weekend.

Thanks,

David


Top
 Profile  
 
 Post subject: Re: msxml6.dll
PostPosted: 11 Mar 2017 10:59 
Offline
User avatar

Joined: 07 Feb 2015 00:48
Posts: 148
Location: Louisville KY USA
Hi Dave,

I fixed the MSXML6 headers to work better now.

I also fixed some problems with exception handling in the IDE. Basically, if you got an exception you were stuck if you had it stopping first-chance. And if you turned off first chance exception mode breakpoints would be disabled so the program would never stop.

Now if you try to proceed from an exception by running the program again it will work if the exception is handled, and breakpoints will be hit as normal, including the single-step breakpoint. You should be able to turn off first-chance exceptions and it will all happen in the background.

Thanks,

David


Top
 Profile  
 
 Post subject: Re: msxml6.dll
PostPosted: 16 Mar 2017 04:38 
Offline

Joined: 19 Jan 2017 03:36
Posts: 8
Hi David,

Thank you, I have now tried the latest version of OCC. Here are my findings:
- CLSID constants are now okay.
- Currently there are still "ACESS VIOLATION" exceptions encountered when I use the new __uuidof(). I can debug my code for now but I am wondering what triggers an exception on my code when I run after CoCreateInstance function.

I attached the project I used for testing msxml, if you want to investigate the exception issue.

-Dave


Attachments:
File comment: test code for msxml. Similar with example from Windows loadDOM.cpp (non smart-pointer example).
msxml.7z [1.97 KiB]
Downloaded 2 times
Top
 Profile  
 
 Post subject: Re: msxml6.dll
PostPosted: 24 Mar 2017 00:45 
Offline
User avatar

Joined: 07 Feb 2015 00:48
Posts: 148
Location: Louisville KY USA
Hi Dave,

some windows components throw exceptions internally then catch them... for example if you try to close an invalid file handle windows throws an exception but I think then it catches it. Msxml seems to do that as well especially for errors.

The default for the IDE is to catch all exceptions including those. If you want to run without those go to the project settings page, select 'debugging', and then change the 'stop at first chance exceptions' setting to 'no'. That will give the msxml component a chance to handle the exception before the IDE reports it to you :). Now that you've said something about it though I'm thinking I may change the default value of that setting in future versions of the IDE.

David


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group