View previous topic :: View next topic |
Author |
Message |
fizzy
Joined: 20 Feb 2006 Posts: 4
|
Posted: Mon Feb 20, 2006 4:04 pm Post subject: using core32 to write windows shell extensions |
|
|
Hi All,
I am hacking my way through writing windows a windows shell extension in D using the various c/c++ tips found here...
http://www.codeproject.com/shell/
I would like to use core32 (and contribute to it if I can) except I am having one issue and that is some things in core32 are conflicting with things already defined in phobos. What is the procedure for handling this. I don't have any specifics (though I vaguely remember an issue with HANDLE) since I have taken teh long road of grafting out the only bits of core32 that I need (to avoid this). This worked fine for my proof of concepting but now that I have the POC working it is too much work to continue this way...
Anyway any help is much appreciated and thanks for all the wonderful guidance that has already gotten me this far. Trust me looking at core32 is how I taught myself to use D to do COM
If you need specific examples I can start from scratch (which is what I am going to do now anyway) and see what issues I run into...
I am using the latest D compiler v0.147 and am using http://svn.dsource.org/projects/core32/downloads/core32_2005.04.19.zip for the source. I am happy to use whatever versions play the nicest together |
|
Back to top |
|
|
fizzy
Joined: 20 Feb 2006 Posts: 4
|
Posted: Mon Feb 20, 2006 9:40 pm Post subject: |
|
|
Okay I got it all compiling with core32 several registry constants had conflicts which I resolved by wrapping them in
version( STANDALONE ) {
}
They were all in win32.winnt and I can supply diffs against the svn trunk.
Here is a beyond compare diff of the changs
Left file: C:\code-playground\core32\core32\win32\winnt.d Right file: C:\dev\D\dmd\src\core32\win32\winnt.d
3536a3537
> version( STANDALONE ) {
3541a3543
> }
3621a3624
> version( STANDALONE ) {
3736a3741
> } |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Tue Feb 21, 2006 10:19 am Post subject: |
|
|
Yes, please post the conflicts that you find in this forum.
I'm out-of-town and don't have access to a DIFF program, but I'm guessing you're referring to these segments:
Code: | 3537 enum {
3538 DLL_PROCESS_ATTACH =1,
3539 DLL_THREAD_ATTACH =2,
3540 DLL_THREAD_DETACH =3,
3541 DLL_PROCESS_DETACH =0
3542 } |
Code: | 3735 REG_RESOURCE_REQUIREMENTS_LIST =( 10 ) |
When I get back to my home computer, I'll try to double-check these line numbers against a DIFF program and change the SVN.
I added a link to this post in Ticket #2 to remind me to fix this. |
|
Back to top |
|
|
fizzy
Joined: 20 Feb 2006 Posts: 4
|
Posted: Tue Feb 21, 2006 12:11 pm Post subject: |
|
|
Yeah that is it... I never read the beyond compare diff before it is pretty cryptic... Here is the results of a TortoiseSVN patch on winnt.d
Code: |
Index: C:/code-playground/core32/core32/win32/winnt.d
===================================================================
--- C:/code-playground/core32/core32/win32/winnt.d (revision 29)
+++ C:/code-playground/core32/core32/win32/winnt.d (working copy)
@@ -3534,12 +3534,14 @@
}
alias RTL_CRITICAL_SECTION * PRTL_CRITICAL_SECTION;
+version( STANDALONE ) {
enum {
DLL_PROCESS_ATTACH =1,
DLL_THREAD_ATTACH =2,
DLL_THREAD_DETACH =3,
DLL_PROCESS_DETACH =0
}
+}
enum {
//
@@ -3619,6 +3621,8 @@
DBG_EXCEPTION_NOT_HANDLED =(cast(DWORD )0x80010001L)
}
+version( STANDALONE ) {
+
//
// Registry Specific Access Rights.
//
@@ -3734,7 +3738,9 @@
REG_FULL_RESOURCE_DESCRIPTOR =( 9 ), // Resource list in the hardware description
REG_RESOURCE_REQUIREMENTS_LIST =( 10 )
}
+}
+
enum {
//
// Service Types (Bit Mask)
| [/code] |
|
Back to top |
|
|
fizzy
Joined: 20 Feb 2006 Posts: 4
|
Posted: Tue Feb 21, 2006 12:37 pm Post subject: |
|
|
Now that I know the version(STANDALONE) trick I am going to go through all my various utils that I poached from core32 and instead use core32 directly...
Once I get the shell extensions working I will pass on the shell.d file with all the def's in it... |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Thu Mar 02, 2006 12:23 pm Post subject: |
|
|
fizzy wrote: | Once I get the shell extensions working I will pass on the shell.d file with all the def's in it... | Great! |
|
Back to top |
|
|
|