I have a small project that works fine as an EXE. Now I want to make
it into a DLL. I've created a DllMain routine and set it as the entry
point (code below). Then from DllMain I try to initialize my main
routine called ThreadProc. I've tryed this several different ways and
can't get it to work. It compiles fine but when I go rundll32
mydll.dll nothing happenes (works in exe form.)
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,
LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
HANDLE hThread = CreateThread(NULL,0,&ThreadProc,NULL,0,NULL);
CloseHandle(hThread);
}
return TRUE;
}
Any assistance would be greatly appreciated. 3 4069
FFrozTT wrote:
I have a small project that works fine as an EXE. Now I want to make
it into a DLL. I've created a DllMain routine and set it as the entry
point (code below). Then from DllMain I try to initialize my main
routine called ThreadProc. I've tryed this several different ways and
can't get it to work. It compiles fine but when I go rundll32
mydll.dll nothing happenes (works in exe form.)
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,
LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
HANDLE hThread = CreateThread(NULL,0,&ThreadProc,NULL,0,NULL);
CloseHandle(hThread);
}
return TRUE;
}
Any assistance would be greatly appreciated.
Wrong group. Try a group with "windows" or "microsoft" in its name. http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
FFrozTT wrote:
I have a small project that works fine as an EXE. Now I want to make
it into a DLL. I've created a DllMain routine and set it as the entry
point (code below). Then from DllMain I try to initialize my main
routine called ThreadProc. I've tryed this several different ways and
can't get it to work. It compiles fine but when I go rundll32
mydll.dll nothing happenes (works in exe form.)
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,
LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
HANDLE hThread = CreateThread(NULL,0,&ThreadProc,NULL,0,NULL);
CloseHandle(hThread);
}
return TRUE;
}
Any assistance would be greatly appreciated.
You will get an answer in microsoft.public.vc.language.
On Sep 5, 10:45 am, FFrozTT <t...@millennium.ab.cawrote:
I have a small project that works fine as an EXE. Now I want to make
it into a DLL. I've created a DllMain routine and set it as the entry
point (code below). Then from DllMain I try to initialize my main
routine called ThreadProc. I've tryed this several different ways and
can't get it to work. It compiles fine but when I go rundll32
mydll.dll nothing happenes (works in exe form.)
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,
LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
HANDLE hThread = CreateThread(NULL,0,&ThreadProc,NULL,0,NULL);
CloseHandle(hThread);
}
return TRUE;
}
Any assistance would be greatly appreciated.
This is a Windows question, not a C++ question, unless
I'm missing something. Try posting this on a Windows
programming group like those in
comp.os.ms-windows.programmer.*. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sam Fields |
last post by:
I have found very little regarding the error "Unable to find an entry point
named EnumerateSecurityPackagesW in DLL security.dll. ". I have an ASP.NET
Web Service being accessed via SSL. I found...
|
by: I am Sam |
last post by:
Hi Everyone,
I am new to Server control development and I am wondering how do I define
the entry point for a server control? In a regular page you define Page_Load
as an entry point and in a...
|
by: TRI_CODER |
last post by:
I am trying to solve the following exception. The exception occurs when my
ASP.NET code behind code attemtps to access a remore site using SSL. Please
note that all certificates are valid and the...
|
by: Mike in Santa Rosa |
last post by:
I'm trying to get a simple c# app built that can launch/manipulate an excel
workbook, sheet. I've chased down several examples and can't any of them to
work. So I must be doing somethnig obviouslt...
|
by: bboule |
last post by:
Hi
I have developped a dll that I want to use in another program !
here is my code :
using System;
using System.Collections.Generic;
using System.Text;
namespace NameSpace
|
by: Lung.S.wu |
last post by:
Hi all,
It is a history question.
Recently, I read the book "C A reference manual, third edition".
In this book, it list all C language keyword, and one is "entry".
I know it is omitted from...
|
by: =?Utf-8?B?R2Vvcmdl?= |
last post by:
Hello everyone,
I am a developer from C++ COM to C# COM. I feel confused about the entry
point function for a C# COM object.
In C++, we always initialize object through GetClassObject or...
|
by: =?Utf-8?B?R2Vvcmdl?= |
last post by:
Hello everyone,
I am implementing a simple C# OLE DB Provider (C# COM Server). For C#
(managed code), I am wondering what is the entry point (which coclass and
which method), client will...
|
by: =?Utf-8?B?R2Vvcmdl?= |
last post by:
Hello everyone,
I have built MSDN OLE DB Sample Provider and successfully built/debug it
using Microsoft Excel as client. I have found that in DllGetClassObject
(classfac.cpp), the class...
|
by: Premkumar |
last post by:
a.cpp
----------------------------------
#include <iostream>
using namespace std;
void mymain() {
cout<<"my-main"<<endl;
}
----------------------------------
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |