forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Comctr32.dll version 6

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Thu May 03, 2007 4:32 am    Post subject: Comctr32.dll version 6 Reply with quote

Has anyone gotten ANY API calls that require Comctr32.dll version 6 to actually work?

The compile option to include the XP manifest does specify ver "6.0.0.0"
but it doesn't seem to help.

Here's the manifest that VDS includes:
Code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="5.1.0.0"
    processorArchitecture="X86"
    name="<Executable Name>"
    type="win32"
/>
<description><Your App Title</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly>



Here's what M$ says it should be: Plus M$ states that you should only change "<Executable Name>"
Code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
   version="1.0.0.0"
   processorArchitecture="X86"
   name="Microsoft.Winweb.<Executable Name>"
   type="win32"
/>
<description>.NET control deployment tool</description>
<dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       processorArchitecture="X86"
       publicKeyToken="6595b64144ccf1df"
       language="*"
     />
   </dependentAssembly>
</dependency>
</assembly>
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu May 03, 2007 12:13 pm    Post subject: Reply with quote

Aslan,
Reguardless of what the manifest says your code would still need to initialize the common controls DLL. The manifest only tells windows that your application is requesting that version of the DLL. If you don't load and initialize the common control library then it will not be available to use. I have found that when your script is running in the IDE everything works fine but when you compile the script and run it as an Exe it will not load the controls with out this bit of code below. The code below requires GadgetX but it should be simple enough to make it with VDS. Here is a link from VBAccelerator that may help when building a custom manifest for you applications.

Code:

Define Variable,Handle,comctl32
Set comctl32,@LoadDLL(comctl32.dll)
Define Function,Integer,comctl32,InitCommonControlsEx,InitComCtl,Pointer|lpComCtrlsEx
Define Structure,iccex,DWORD|dwSize,DWORD|dwICC

Rem Several window class ID's used with the common controls DLL
Define Constant,ICC_TREEVIEW_CLASSES,2
Define Constant,ICC_LISTVIEW_CLASSES,1
Define Constant,ICC_BAR_CLASSES,4
Define Constant,ICC_TAB_CLASSES,8
Define Constant,ICC_UPDOWN_CLASS,$10
Define Constant,ICC_PROGRESS_CLASS,$20
Define Constant,ICC_HOTKEY_CLASS,$40
Define Constant,ICC_ANIMATE_CLASS,$80
Define Constant,ICC_WIN95_CLASSES,$FF
Define Constant,ICC_DATE_CLASSES,$100
Define Constant,ICC_USEREX_CLASSES,$200
Define Constant,ICC_COOL_CLASSES,$400
Define Constant,ICC_INTERNET_CLASSES,$800
Define Constant,ICC_PAGESCROLLER_CLASS,$1000
Define Constant,ICC_NATIVEFNTCTL_CLASS,$2000

:InitComCtl
Rem Initialize the correct version of the common controls DLL comctl32.dll
Set iccex.dwSize,@SizeOf(iccex)
Set iccex.dwICC,ICC_LISTVIEW_CLASSES
%%comctl = @Call(InitComCtl,@AddrOf(iccex))

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Thu May 03, 2007 8:47 pm    Post subject: Reply with quote

I've been initializing Common Controls at the beginning of the script. It has been working because my imagelist creation code won't work without it. The problem is I don't think it is using ver 6.

Code:

LOADLIB comctl32.dll
    %X = @lib(comctl32.dll,InitCommonControls,NIL:,NIL:)


Of course, I free it at the end of the script.
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri May 04, 2007 2:08 am    Post subject: Reply with quote

According to the Windows Platform SDK under the "InitCommonControlsEx Function"

Quote:
Windows XP: If a manifest is used, InitCommonControlsEx is not required.


Any other ideas?
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sun May 06, 2007 2:34 pm    Post subject: Reply with quote

Aslan,
Ummm under the comctl32.dll version 6.0 the InitCommonControls function does nothing. Check out this MSDN page

MSDN InitCommonControls Remarks wrote:
Under Comctl32.dll version 5.x, only Microsoft Windows 95 classes (ICC_WIN95_CLASSES) can be registered through InitCommonControls. Programs which require additional common control classes must use the InitCommonControlsEx function.

Under Comctl32.dll version 6.0 and later, InitCommonControls does nothing. Applications must explicitly register all common controls through InitCommonControlsEx.

_________________
Home of

Give VDS a new purpose!


Last edited by vdsalchemist on Mon May 07, 2007 12:03 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun May 06, 2007 11:00 pm    Post subject: Reply with quote

Hmmm, wouldn't be the first time I got conflicting info from M$ Confused

I got the above info from here http://msdn2.microsoft.com/en-us/library/ms672653.aspx in the remaks section.

I'll try your code w/GadgetX and native VDS and report back.
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun May 06, 2007 11:03 pm    Post subject: Reply with quote

Dragonshere,

BTW - Your MSDN link in your above post points to http://www.vdsworld.com/forum/posting.php?mode=reply&t=4398?

Could you please repost the link.
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon May 07, 2007 12:04 am    Post subject: Reply with quote

Ok I updated the link... It's just the link to the info for the InitCommonControls function on MSDN.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group