Click here to Skip to main content
15,914,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need to 'hire' a programmer for a very small program. 75 % complete already Pin
Pete O'Hanlon14-Dec-08 8:29
mvePete O'Hanlon14-Dec-08 8:29 
QuestionProfile.FullName Issue Pin
laziale13-Dec-08 7:05
laziale13-Dec-08 7:05 
AnswerRe: Profile.FullName Issue Pin
Lev Danielyan13-Dec-08 8:43
Lev Danielyan13-Dec-08 8:43 
QuestionHow can a 32-bit process gain access to the 64-bit values under HKLM\SOFTWARE? [modified] Pin
dandy7213-Dec-08 5:39
dandy7213-Dec-08 5:39 
AnswerRe: How can a 32-bit process gain access to the 64-bit values under HKLM\SOFTWARE? Pin
Richard Andrew x6413-Dec-08 10:45
professionalRichard Andrew x6413-Dec-08 10:45 
AnswerRe: How can a 32-bit process gain access to the 64-bit values under HKLM\SOFTWARE? Pin
Richard Andrew x6413-Dec-08 10:46
professionalRichard Andrew x6413-Dec-08 10:46 
GeneralRe: How can a 32-bit process gain access to the 64-bit values under HKLM\SOFTWARE? Pin
dandy7214-Dec-08 7:10
dandy7214-Dec-08 7:10 
Questioncascade-style distribution of files over a LAN Pin
Bartosz Bien13-Dec-08 5:04
Bartosz Bien13-Dec-08 5:04 
AnswerRe: cascade-style distribution of files over a LAN Pin
Dave Kreskowiak13-Dec-08 5:44
mveDave Kreskowiak13-Dec-08 5:44 
QuestionPrevent empty cells in datagridview Pin
Yustme13-Dec-08 5:02
Yustme13-Dec-08 5:02 
AnswerRe: Prevent empty cells in datagridview Pin
Christian Graus13-Dec-08 10:43
protectorChristian Graus13-Dec-08 10:43 
QuestionHow to return value from a thread Pin
anveshvm13-Dec-08 4:00
anveshvm13-Dec-08 4:00 
GeneralRe: How to return value from a thread Pin
Luc Pattyn13-Dec-08 4:42
sitebuilderLuc Pattyn13-Dec-08 4:42 
AnswerRe: How to return value from a thread Pin
User 433002813-Dec-08 16:10
User 433002813-Dec-08 16:10 
Questioninstalling application only once at one client Pin
praveenvkumarv13-Dec-08 2:45
praveenvkumarv13-Dec-08 2:45 
AnswerRe: installing application only once at one client Pin
Dave Kreskowiak13-Dec-08 5:41
mveDave Kreskowiak13-Dec-08 5:41 
QuestionDll LibMain Function? Pin
OptiPlex13-Dec-08 1:26
OptiPlex13-Dec-08 1:26 
Hey

I want to inject DLL made in C# into an Application.
Ive been looking for this for a long time, but still cant find the answer.
In C you would use it like this
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    switch (fdwReason)
    {
        case DLL_PROCESS_ATTACH:
            // attach to process
            MessageBox(0, "Test", "Test", MB_OK);
            break;

        case DLL_PROCESS_DETACH:
            // detach from process
            break;

        case DLL_THREAD_ATTACH:
            // attach to thread
            break;

        case DLL_THREAD_DETACH:
            // detach from thread
            break;
    }
    return TRUE; // succesful
}


Is there a way to do this in C#? Like when I inject it, that it also shows the MessageBox at successfull injection?
Thanks in Advance
- opx
AnswerRe: Dll LibMain Function? Pin
User 665813-Dec-08 2:19
User 665813-Dec-08 2:19 
GeneralRe: Dll LibMain Function? Pin
OptiPlex13-Dec-08 2:56
OptiPlex13-Dec-08 2:56 
GeneralRe: Dll LibMain Function? Pin
User 665813-Dec-08 3:11
User 665813-Dec-08 3:11 
QuestionRe: Dll LibMain Function? Pin
OptiPlex13-Dec-08 3:37
OptiPlex13-Dec-08 3:37 
AnswerRe: Dll LibMain Function? Pin
User 665813-Dec-08 4:24
User 665813-Dec-08 4:24 
GeneralRe: Dll LibMain Function? Pin
OptiPlex13-Dec-08 4:27
OptiPlex13-Dec-08 4:27 
GeneralRe: Dll LibMain Function? Pin
User 665813-Dec-08 5:11
User 665813-Dec-08 5:11 
GeneralRe: Dll LibMain Function? Pin
Dave Kreskowiak13-Dec-08 5:40
mveDave Kreskowiak13-Dec-08 5:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.