Dear mr woka,is it possible to connect to other application too??Thanks a lot..
Dear mr woka,is it possible to connect to other application too??Thanks a lot..
@Wokawidget: Thanks a lot for this multithreading project...
I will try experimenting with it....![]()
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...
Although WokaWidget's multithreading code is quite old now, it is ideal for what I am doing (spread a large VB6 number-crunching simulation across multiple processor cores).
Had it all working in the IDE and compiled, but then when I add a manifest file, the mobjgateway DLL immediately crashes with an error on SetWindowsLong
This problem is simple to reproduce with WokaWidgets vbGateway2\Demo\Project1 code. Just add a standard 'XP' manifest (as project1.exe.manifest containing the usual mscomctl assembly for XP look). Start up project1.exe and bingo - you get an error 'Unable to hook window', which is generated by SetWindowLong in sub HookWindow in mobjgateway.vbp
SO... Can anyone tell me what the manifest is screwing up and why? Then point me at how to resolve it???
Thanks
(The original zip file is at http://www.vbforums.com/attachment.p...1&d=1089126436)
Wow. Never seen than before.
I have never really done any work in anger with manifest files and vb6 I am afraid.
But why it should cause an error of that nature is a bit of a mystery.
Can you post a screen shot of the error...and the function, including all the functions lines of code, where this occured.
cheers,
woka
ps Glad you like it![]()
My .NET Tutorials:
Silverlight Enabled WebPart in WSS
My VB.NET Code Examples:
Create IIS Virtual Directory Validate Login Against Active Directory Automatically retrieve Identity field value from inserted DataRow using SQL Server and ADO.NET
My ASP.NET Code Examples:
Login To Website (Forms Authentication) Login To Website (Custom Authentication)
My VB6 Code Projects:
Multithreading In VB6 Custom Tooltips Multi Language Support Item Selector Control Annimated Systray Icon Simple Effective Graph Control Download From Web LiveUpdate, download application updates from the web automatically Systray Notification Messages Skin A Form API Timer Badger Messenger, an MSN clone that uses the MSN Network Wokawidgets VB6 Component Suite
While I do love my vbGateway code...it's a little bit outdated now thanks to .NET.
You know you can do in .NET in a few lines of code what this entire project does?
Woka
My .NET Tutorials:
Silverlight Enabled WebPart in WSS
My VB.NET Code Examples:
Create IIS Virtual Directory Validate Login Against Active Directory Automatically retrieve Identity field value from inserted DataRow using SQL Server and ADO.NET
My ASP.NET Code Examples:
Login To Website (Forms Authentication) Login To Website (Custom Authentication)
My VB6 Code Projects:
Multithreading In VB6 Custom Tooltips Multi Language Support Item Selector Control Annimated Systray Icon Simple Effective Graph Control Download From Web LiveUpdate, download application updates from the web automatically Systray Notification Messages Skin A Form API Timer Badger Messenger, an MSN clone that uses the MSN Network Wokawidgets VB6 Component Suite
Woka,
Here are the full details of the problem with vbGateway. I have stripped out all the code down to the bare minimum - even removing the .startlink
The test code
Procedure: The attached zip file contains the vbp and also the manifest file. The second zip is the original Woka gateway code with vbGateway2Code:Option Explicit Private WithEvents mobjGateway As Gateway Private Sub Form_Load() Set mobjGateway = New Gateway End Sub
1. Compile vbGateway2 and register the dll
2. Compile SimpleDemo (after adding the wokawidget gateway reference of course)
3. Now run SimpleDemo.exe and you will see -
This seems to be from vbGateway2 'HookWindow' -
4. Now rename SimpleDemo.exe.manifest as, say, TTSimpleDemo.exe.manifest. Start SimpleDemo again - it works fineCode:Public Sub HookWindow(ByRef pobjGateway As Gateway) Dim lngOldWndProc As Long lngOldWndProc = SetWindowLong(pobjGateway.hWnd, GWL_WNDPROC, AddressOf WndProc) If lngOldWndProc > 0 Then pobjGateway.OldWndProc = lngOldWndProc If mcolItems Is Nothing Then Set mcolItems = New Collection End If mcolItems.Add ObjPtr(pobjGateway), CreateKey(pobjGateway.hWnd) Else Err.Raise vbObjectError, App.EXEName, "Unable to hook window." End If End Sub
5. Now put SimpleDemo.exe.manifest back again and edit SimpleDemo.vbp to remove the 'Set mobjGateway = New Gateway' statement. Compile and run again - it works fine as well. (By the way, the reason the 'DoesNothing' button is there is simply to show that the manifest is working and doesn't have an error (i.e. you see the XP-style button).
I have no idea why the manifest is screwing up the gateway - I always thought it simply forces use of the 6.0 version of MSCOMCTL (along with InitCommonControls in the code, which I have also stripped out in this test).
Help!!
Hi
Im trying to test this code but when i open vbgateway2.vbp then i get this message in vb6:
Unable to set version compatible component: c:/program files/student works/common/compatible/vbgateway2.dll
How to fix it?
Try using the version in post 46 if the one in post #1 is causing the problem or vice-verse. If the source code of the dll is included recompile it with the version compatibility set to none. Save the project then recompile using "Binary Compatibility" using the previous dll you just created as the reference.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
Hi thank you for interesting my problem.
The point is this error Message is appearing when i open source code of this dll. There are no compiled dll in this package. Other test projects in this package are opening but they require this dll. If i compile it althought this error message then using it as a reference i get actixeX error.
I done what you suggested but it dosnt help. There are still the same error. What can i else do?
Make sure you unselect the dll reference in the main projects (project that uses the dll) then save it and re reference the dll again.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
Good point thanksnow i can open and test project from /demo/ folder. It works great. But i still have problems with demos in /Multithreading/ folder.
DemoUi - there are still errors with activex obkect when i click search.
Set objsearch = CreateObject("searchThread.clsNewSearch")
This is highlighten
ThreadUI - no errors, but nothing happens when i Run this project.
What can i do to run it?
Nobody?![]()