Questions tagged [createthread]

70 questions
1
vote
1 answer

Trying to multithread program. C++/CLI

Hey i'm trying to multithread my program in c++/cli but i'm having problems with creating the threads the code im using is: private: Void startThread() { MoveProj.Velocity = Variables.Velocity; MoveProj.ProjectilePos =…
gjones
  • 367
  • 3
  • 13
1
vote
1 answer

shell32.dll: access violation during GetOpenFileName new thread

GetOpenFileName fails with access violation. File must be on DESKTOP and have long name. Problem occurs only after first successful open of the file. Problem occurs when mouse cursor hovers over file as tool tip about to be displayed. See the…
Mike D
  • 2,753
  • 8
  • 44
  • 77
0
votes
0 answers

access violation on line WaitForSingleObject()

can anyone help me with this ERROR. i'm basically reading an exe file, decrypt it and copy it to memory and then executing it using createthread() but it seems that i've made some mistake when implementing this method. unsigned char key[] = { 0x00,…
0
votes
1 answer

Boost library and CreateThread win API

I have a class such as : class MyStreamReader { public: MyStreamReader(MyPramameter myPram) {.....} ~MyStreamReader() {} DWORD WINAPI ReaderThread(LPVOID *lpdwThreadParam ) { //.... } }; and i want to call …
Novalis
  • 2,265
  • 6
  • 39
  • 63
0
votes
1 answer

any can please explain me this boost create_thread line?

im implementing a github commit on my repo but i see a line and i dont understeand what it means, here is the line: threadGroup.create_thread(boost::bind(&BeeKeeper, boost::cref(chainparams))); i understeand the threadGroup, i know what it its…
user15069192
0
votes
1 answer

CreateThread seems to behave like fork()

I have this function int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int …
gc5
  • 9,468
  • 24
  • 90
  • 151
0
votes
2 answers

CreateThread from DLL - ERROR_NOT_ENOUGH_MEMORY

i've got this dll that creates a thread when loaded by LoadLibraryA, the dll is injected into another process using RtlCreateUserThread, the injection succeeds, the dll is loaded into the target process (kernel32 LoadLibraryA thread is there) but…
helloworld0101
  • 140
  • 1
  • 7
0
votes
1 answer

CreateThread sharing variables to external functions

Summarised question: What is the best method to monitor thread variables in a function external to thread? Original Question: I am looking to get a better understanding of the best practices when using Windows threading. I understand there are more…
CiunasBothar
  • 81
  • 2
  • 8
0
votes
1 answer

WINAPI: Create new thread on class member function - incompatable parameter type

I've been re-architecting some fairly procedural C++ into something more classy. The original code runs just fine and part of it spins up a new thread to do some file cleaning. The function that does this cleaning is the entry point for the new…
Ben
  • 427
  • 5
  • 17
0
votes
1 answer

Winsock Server using WinAPI Thread reset first connection

I have written a Server using WINAPI with CreateThread() Method. The first connection request always dies. All the following requests/threads are working as expected. I have no idea why so i hope someone could tell me. Here is a working example…
XFPlayer
  • 11
  • 3
0
votes
1 answer

How to put IDispatch::Invoke to a MFC C++ Thread?

How to put the IDispatch::Invoke to a thread and call TerminateThread if it timeouts? The reason I wanted to do this is because I find that sometimes the Invoke call will go into infinity loop and never return anything and hence the call will just…
0
votes
1 answer

Python - Ctype.windll.kernel32.CreateThread Parameter value

this might be a really simple question, but somehow I just cannot wrap my head around the answer, and I cannot find any good and related documentations on such topic either. So I am attempting to do a PoC using Python's ctypes module and the…
0x5929
  • 400
  • 1
  • 4
  • 16
0
votes
4 answers

c++ CreateThread non static member without particular member name

I'm trying to create a thread with a non-static class member, like this: template DWORD WINAPI StartThread(PVOID ptr) { ((clName*)(ptr))->testf(); // this is static member name I want to be able use different names with the same…
dev65
  • 1,440
  • 10
  • 25
0
votes
0 answers

Porting Managed C# code to Unmanaged C++ code - Threads, Registry classes

I am porting managed code to unmanaged code. I have APIs in managed code from these below namespaces using namespaces System::Threading::Tasks; using namespaces System::Registry; I have converted Registry APIs. I am facing problem in converting //…
Arun AC
  • 417
  • 7
  • 17
0
votes
1 answer

Using CreateThread winapi in Powershell script

i want create thread that run script code in powershell using CreateThread WinApi. i use this code but error occured: function local:Get-ProcAddress { Param ( [OutputType([IntPtr])] [Parameter( Position = 0, Mandatory = $True )] …