|
-
Feb 10th, 2020, 07:23 AM
#1
Thread Starter
PowerPoster
CreateThread by Activex Exe In vb6(Support Shared variables)
CreateThread by Activex Exe In vb6(Support Shared variables)
Code:
ActivexExeThread.bas
Public Src As String '主变量
Public MEM(0) As String
Public x As Long
Public ABC As Long, X2 As Long
Public AbcArr(0) As Long
in thread forms:
Private Sub ShowSrcAbc_Click()
Dim OldAbc As Long
'AbcArr(X2)=abc
'MEM(x) =src
OldAbc = AbcArr(X2)
MEM(x) = "test:" & Now
AbcArr(X2) = AbcArr(X2) + 1
MsgBox "Src=" & MEM(x) & vbCrLf & "Old Abc=" & OldAbc & vbCrLf & "New ABC=" & AbcArr(X2), , "ThreadID = " & App.ThreadID
End Sub
in main form:
MsgBox "Src=" & Src & vbCrLf & "ABC=" & ABC, , "threadid=" & App.ThreadID
v2CreateThread by Activex Exe In vb6.zip
Last edited by xiaoyao; Feb 10th, 2020 at 08:07 AM.
-
Feb 10th, 2020, 10:54 PM
#2
Hyperactive Member
Re: CreateThread by Activex Exe In vb6(Support Shared variables)
 Originally Posted by xiaoyao
CreateThread by Activex Exe In vb6(Support Shared variables)
Code:
ActivexExeThread.bas
Public Src As String '主变量
Public MEM(0) As String
Public x As Long
Public ABC As Long, X2 As Long
Public AbcArr(0) As Long
in thread forms:
Private Sub ShowSrcAbc_Click()
Dim OldAbc As Long
'AbcArr(X2)=abc
'MEM(x) =src
OldAbc = AbcArr(X2)
MEM(x) = "test:" & Now
AbcArr(X2) = AbcArr(X2) + 1
MsgBox "Src=" & MEM(x) & vbCrLf & "Old Abc=" & OldAbc & vbCrLf & "New ABC=" & AbcArr(X2), , "ThreadID = " & App.ThreadID
End Sub
in main form:
MsgBox "Src=" & Src & vbCrLf & "ABC=" & ABC, , "threadid=" & App.ThreadID
v2CreateThread by Activex Exe In vb6.zip
dear xiaoyao,
Nice example supporting shared variables.You can update it to support user control using http://www.vbforums.com/attachment.p...3&d=1581316682
regards,
JSVenu
-
Feb 20th, 2020, 04:06 PM
#3
Thread Starter
PowerPoster
Re: CreateThread by Activex Exe In vb6(Support Shared variables)
please put,move this thread to code bank
@postmaster
-
Feb 20th, 2020, 05:45 PM
#4
Re: CreateThread by Activex Exe In vb6(Support Shared variables)
 Originally Posted by xiaoyao
please put,move this thread to code bank
@postmaster
I'd rather suggest to the moderators, to remove this spam from the forum...
(your posts still do not contain anything useful, they are complete nonsense).
Olaf
-
Feb 20th, 2020, 08:55 PM
#5
Thread Starter
PowerPoster
Re: CreateThread by Activex Exe In vb6(Support Shared variables)
Standard dll, multithreading, function callbacks, in many cases do not support global variables. You can use pointer, secure array method, using variable address offset to read write data. You can also use the memory mapping method (createfilemapping), was originally used for multi-process sharing data, this process, multi-thread can also be used. There is also a way to write function addresses to data in a compiled way during the run. The equivalent of dynamic compilation, other threads can read this function to get the data.
Last edited by xiaoyao; Feb 20th, 2020 at 09:05 PM.
-
Feb 20th, 2020, 08:56 PM
#6
Thread Starter
PowerPoster
Re: CreateThread by Activex Exe In vb6(Support Shared variables)
 Originally Posted by jsvenu
Vb6 multithreading supports ocx controls, display windows, many people may think it is not necessary at all, we (forum member: The trick,jsvenu) also studied activex.exe support multithreading, display ocx controls, user-defined controls, I think it is very fun, accumulate technology and experience. In the past, I used to use vb to develop a standard dll, double click that can output functions to run the display form (supporting multithreading) as a normal exe, with ocx controls and a com dll. The functions inside allow vba to support multithreading. Maybe such a multifunctional freak dll file doesn't seem to have much use. But when it comes to doing it, it proves that vb6 is powerful and can do more impossible things. I learned a lot of experience in the course of the challenge.
-
Feb 20th, 2020, 09:40 PM
#7
Re: CreateThread by Activex Exe In vb6(Support Shared variables)
 Originally Posted by xiaoyao
...it proves that vb6 is powerful
VB6 is powerful without any of the "wannabe-hacker" nonsense.
 Originally Posted by xiaoyao
I learned a lot of experience in the course of the challenge.
And still I've not seen a single Real-World-Demo-App from you,
which applies this (allegedly) "advanced coding" in something concrete (in a scenario that does something really useful).
Furthermore, most of these "advanced" snippets were not developed by you -
all I've seen you do (in your uploaded Zip-Files) is:
- reposting parts of the "advanced" hacks (without giving any credits to the original authors)
- in a coding-style which is nearly unreadable
- all in so far only synthetic demos (which never show, what the purpose of the whole "hacking-exercise" is, or what problem it tries to solve)
- all accompanied by a lot of "noise" in bad, autotranslated english (often followed by "probably badly written chinese" as well)
I'm still not entirely sure, whether we see some "bot-testing" here ...
A handful of the responses could be "occasionally beautified by the bot-developer" it seems -
but all the rest of your postings read like autogenerated (unsufficiently, only halfway) context-related bot-responses.
Please stop this spamming, unless you have some real-world-demos to show, which you developed yourself.
Olaf
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
|