Hi,
This is my wraper code over the DOM API component of Windows, in asm32 language. include sample code and necessary inc file. because XML inc/lib or code is not available in masm32 compiler's librarys or in this forum, so this post may be usefull to anyone.
enjoy it.
veri@
This is my wraper code over the DOM API component of Windows, in asm32 language. include sample code and necessary inc file. because XML inc/lib or code is not available in masm32 compiler's librarys or in this forum, so this post may be usefull to anyone.
enjoy it.
veri@
Wow. Thank you for sharing.
BTW you should preserve ebx in ParseXML ;).
greetings
GM
BTW you should preserve ebx in ParseXML ;).
greetings
GM
Gismo,
thanks, you are right. I forget it.
Any suggestion to optimize this code, for example in memory management or speed optimization, can be usefull.
regards
Veri@
thanks, you are right. I forget it.
Any suggestion to optimize this code, for example in memory management or speed optimization, can be usefull.
regards
Veri@
Hi, veri@
I found a memory leak in your code.
When your app closes, it tries to free memory:
but in your case, lpwXMLBuff is Local variable!
so, declare it as global variable.
does lpXMLBuff is freed anywhere in your code?
when you call LoadXMLFile, you do not free lpXMLBuff buffer in case if all was OK.
and in case of fail of LoadXMLFile, bstr is not freed too.
Attached updated source code.
I found a memory leak in your code.
When your app closes, it tries to free memory:
invoke GlobalFree,lpwXMLBuff
but in your case, lpwXMLBuff is Local variable!
so, declare it as global variable.
does lpXMLBuff is freed anywhere in your code?
when you call LoadXMLFile, you do not free lpXMLBuff buffer in case if all was OK.
and in case of fail of LoadXMLFile, bstr is not freed too.
Attached updated source code.
--------------------------------------
v1.1 Oct 1, 2007
--------------------------------------
[-] Memory leak fixed
[+] VersionInfo resource added
[+] Manifest
[+] Icon
[*] Little code redesign
[+] WinAsm Studio Project
[!] by Jupiter
Hi
Thank you Jupiter.
I am so happy for your post and your attached update. I hope this code can be extend in the future more and more. I will review your code later.
Thanks again.
Thank you Jupiter.
I am so happy for your post and your attached update. I hope this code can be extend in the future more and more. I will review your code later.
Thanks again.