|
-
Oct 17th, 2006, 02:43 AM
#1
Thread Starter
Lively Member
[RESOLVED] Loading mswinsck.ocx with resource editor
Hey. I want to know how to make a program and when you click a button it extracts mswinsck.ocx to the current dir.
I tried:
Private Sub Command1_Click()
Dim x As String
x = LoadResData(101, "CUSTOM")
Open "mswinsck.ocx" For Binary Access Write As #1
Put #1, , x
Close #1
End Sub
and failed.
I opened the real mswinsck.ocx with UEdit and compared it to the one I extracted. It was exactly the same exept at the start, it had
". ...(c with a stroke through it)......" So I took that all out and it was exactly the same as the real mswinsck.ocx. How can I take it out? Or is there a better way? Ionno.
Last edited by skankerer; Oct 17th, 2006 at 02:59 AM.
-
Oct 17th, 2006, 03:08 AM
#2
Re: Loading mswinsck.ocx with resource editor
Why would you need to do that instead of installing your app?
-
Oct 17th, 2006, 04:45 AM
#3
Thread Starter
Lively Member
Re: Loading mswinsck.ocx with resource editor
I don't see an installer necessary only for an exe and an ocx component, nor do I want to use 3rd party "file packers" or whatever. Plus, I just want to know how to do it.
-
Oct 17th, 2006, 04:53 AM
#4
Re: Loading mswinsck.ocx with resource editor
If you are going to take the time to ask the questions to the knowledgable people, you really should take the time to understand the answers from the same.
-
Oct 17th, 2006, 05:04 AM
#5
Thread Starter
Lively Member
Re: Loading mswinsck.ocx with resource editor
What? I was never given an answer.
-
Oct 17th, 2006, 05:07 AM
#6
Re: Loading mswinsck.ocx with resource editor
Sure you were, check you PM. It will explain everything... Well most of it anyway.
-
Oct 17th, 2006, 05:13 AM
#7
Thread Starter
Lively Member
Re: Loading mswinsck.ocx with resource editor
Nope. I have no Private Messages regarding this subject currently residing in my inbox
-
Oct 17th, 2006, 10:30 AM
#8
Member
Re: Loading mswinsck.ocx with resource editor
This will work,It work for me tho...
First you have to add MSWINSCK.OCX to your Resource Editor and save ofcorse.
Then the code:
VB Code:
Private Sub Command1_Click()
Dim FFile As Byte, ByteArray() As Byte
ByteArray = LoadResData(101, "CUSTOM")
FFile = FreeFile
Open "C:\WINDOWS\System32\MSWINSCK.OCX" For Binary Access Write As #FFile 'If you like to drop it in System 32
'Open App.Path & "\MSWINSCK.OCX" For Binary Access Write As #FFile 'Drop it at the place where your App is running
Put #FFile, , ByteArray
Close #FFile
DoEvents
End Sub
-
Oct 17th, 2006, 02:25 PM
#9
Re: Loading mswinsck.ocx with resource editor
Just because you can do something doesn't mean that you really should. Why not avoid the problems all together. I am sure the people who you give your app to will appreciate it!
Shortcuts are the sign of a feeble mind...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|