Lengkap

Build an event, that is usable from a C# program, which belongs to a C++ program.

I have a small C++ dll which creates a CLRCreateInstance and loads a C# dll.

Here is the source:

///////////////////////////////////////////////////////////////////////////////////////////////////////

#include <metahost.h>

#pragma comment(lib, "[login to view URL]")

DWORD WINAPI ControlThread(LPVOID lpParam)

{

ICLRMetaHost* metaHost = NULL;

ICLRRuntimeInfo* runtimeInfo = NULL;

ICLRRuntimeHost* runtimeHost = NULL;

if (CLRCreateInstance(CLSID_CLRMetaHost, IID_ICLRMetaHost, (LPVOID*)&metaHost) == S_OK)

if (metaHost->GetRuntime(L"v4.0.30319", IID_ICLRRuntimeInfo, (LPVOID*)&runtimeInfo) == S_OK)

if (runtimeInfo->GetInterface(CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (LPVOID*)&runtimeHost) == S_OK)

if (runtimeHost->Start() == S_OK)

{

DWORD pReturnValue;

runtimeHost->ExecuteInDefaultAppDomain(L"C:\\[login to view URL]", L"[login to view URL]", L"EntryPoint", L"asd", &pReturnValue);

runtimeInfo->Release();

metaHost->Release();

runtimeHost->Release();

}

return 0;

}

BOOL APIENTRY DllMain(HMODULE hModule,

DWORD ul_reason_for_call,

LPVOID lpReserved

)

{

switch (ul_reason_for_call)

{

case DLL_PROCESS_ATTACH:

CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ControlThread, hModule, NULL, NULL);

break;

case DLL_THREAD_ATTACH:

case DLL_THREAD_DETACH:

case DLL_PROCESS_DETACH:

break;

}

return TRUE;

}

///////////////////////////////////////////////////////////////////////////////////////////////////////

And now here is the source code for the C# [login to view URL]

///////////////////////////////////////////////////////////////////////////////////////////////////////

namespace ExampleProject

{

public class Example

{

public static int EntryPoint(string pwzArgument)

{

string processName = [login to view URL]().ProcessName;

[login to view URL]("The current process is " + processName);

return 0;

}

}

}

///////////////////////////////////////////////////////////////////////////////////////////////////////

What I want is to create a second thread in the C++ project and call it TickEvent

///////////////////////////////////////////////////////////////////////////////////////////////////////

DWORD WINAPI TickEvent(LPVOID lpParam)

{

while (true)

{

Sleep(500);

//[login to view URL]();

}

}

///////////////////////////////////////////////////////////////////////////////////////////////////////

And use it like this in the C# [login to view URL]

///////////////////////////////////////////////////////////////////////////////////////////////////////

namespace ExampleProject

{

public class Example

{

public static int EntryPoint(string pwzArgument)

{

[login to view URL] += OnTick;

}

private static void OnTick(EventArgs args)

{

string processName = [login to view URL]().ProcessName;

[login to view URL]("Called every 500ms inside " + processName);

return 0;

}

}

}

///////////////////////////////////////////////////////////////////////////////////////////////////////

The question from me is, can you make an event like this, which is controlled from the C++ dll and usable from any C# dll?

If you can complete this task, I will be asking from you to also implement different C++ API which are usable in C# inside the events earlier created.

Please take a moment and use the passw0rd "I am C# pr0grammer" to confirm you have read my post in general and are sure you can complete it.

Kemahiran: Pengaturcaraan C#, Pengaturcaraan C++, Pengaturcaraan C, Kejuruteraan Perisian, .NET

Lihat lagi: build event flyers program, build event database, build event planner websites, build a website using c#, build a website using c, c program of a small job for university, c program operating system, c program outsources, c program to show encryption and attacking, c program, c# program, c++ program outsources, C++ program, c/c++ program, convert open source command-line c++ program to pure java, convert open source commandline c program to pure java, freelance c program, implement a parser that processes sequences of correctly paired ifs and elses in a c program, what purpose does the n serve in the c++ program, Build a c++ program

Tentang Majikan:
( 16 ulasan ) Stara Zagora, Bulgaria

ID Projek: #22266905

Dianugerahkan kepada:

vadimrabota77

How are you? I am ready to work for your project. I have rich experience of 5+years in this skill. I will complete your project perfectly, shortly. I will wait for your message. best regard

$250 USD dalam 7 hari
(0 Ulasan)
0.0
ufarus102

I am C # pr0grammer ~~~ Very interested to me! ~~~ Hi, dear! Feel contact me for these kinds of projects. I will provide you the best result on [login to view URL] give me 10 minutes of yours. I am waiting for your message to Lagi

$700 USD dalam 7 hari
(2 Ulasan)
3.7

23 pekerja bebas membida secara purata $529 untuk pekerjaan ini

AwaisChaudhry

Hi,. I have gone through the brief details mentioned on the job. I have done multiple jobs with .NET, C Programming, C# Programming, C++ Programming, Software Architecture which are the skills required to get this job Lagi

$750 USD dalam 7 hari
(63 Ulasan)
7.8
limillion819

Hi there. I am very interested in your proposal. I can instantly help you with your starting project with a successful completion. As a professional C# developer, I ensure a perfect ongoing project. You will never be d Lagi

$500 USD dalam 7 hari
(45 Ulasan)
6.8
adampohp79

I can start work right now and I can show you perfect result in a short time. Please contact me freely. Waiting for you with your great news.

$500 USD dalam 7 hari
(43 Ulasan)
5.9
chomsengdev

Hello How are you? I am C++/C# expert. So I can do it. I would like to discuss in detail via chat. Thanks

$500 USD dalam 7 hari
(8 Ulasan)
4.9
Alexsfodik

I am C# pr0grammer Hello. How are you. I'm software engineer and algorithm expert. I have many experiences in c, c++, c#, java, python, node.js. I can complete your project successfully. Thanks.

$500 USD dalam 15 hari
(10 Ulasan)
4.6
healer818

I am C# pr0grammer Hello client!!! I have just read in your requires carefully and enjoy working with ones like that. I can complete your tasks perfectly in short time because I'm an excellent software engineer that ha Lagi

$700 USD dalam 10 hari
(7 Ulasan)
4.7
michaels225

Hi, sir I have rich experience with C/C++, C# and Data structure and Algorithm. Also, APIs and DLL injection are really talent skills for me. So, I am absolutely sure that I can do the project very well. Let's discus Lagi

$500 USD dalam 7 hari
(15 Ulasan)
4.6
mackthehobbit

"I am C# pr0grammer" - I understand your frustration with automated bids. Hello, I'm very experienced with C, C++ and C# programming and I believe I can help you implement this project. I would implement this type of f Lagi

$400 USD dalam 5 hari
(15 Ulasan)
3.8
greenguru2018

Hello, How are you? My pleasure to bid your project. I've read carefully your project description. I have more than five years experience in development related with your project. Your satisfaction with the project is Lagi

$500 USD dalam 7 hari
(10 Ulasan)
3.7
umairkaramat24

Hello There. How are you doing?. I have read the description, I have great experience doing similar jobs related to these skills .NET, C Programming, C# Programming, C++ Programming, Software Architecture. Please start Lagi

$555 USD dalam 9 hari
(5 Ulasan)
3.3
sirajahmadzai

Dear Hiring Manager, After reviewing your job description, it’s clear that you’re looking for a candidate that is extremely familiar with the responsibilities associated with the role, and can perform them confidentl Lagi

$533 USD dalam 7 hari
(7 Ulasan)
2.9
Artemrodin1987

I am C# pr0grammer I am C# pr0grammer I am C# pr0grammer I am C# pr0grammer I am C# pr0grammer I am C# pr0grammer I am C# pr0grammer

$400 USD dalam 7 hari
(5 Ulasan)
3.0
KonstanBer

Good day! I'm a licensed full stack developer and designer. I have rich experiences in python/Django, python selenium , image processing by using openCV and google apis and extensions. I have many experiences in c#, Lagi

$500 USD dalam 7 hari
(4 Ulasan)
3.2
MWaqar5246

Hi there, Just gone through the description completely. Can surely work on your project as we have done similar work in the past. We have a team of professionals working for website development. Reach at inbox to discu Lagi

$650 USD dalam 7 hari
(4 Ulasan)
2.9
ravendrapayasi

HI, Greetings!! I have seen your job post carefully and gone through your job requirement which is very clear to me. I am very much interested to work in your project. Your project will take maximum 2 week to complete Lagi

$277 USD dalam 15 hari
(2 Ulasan)
2.5
topman068001

Hi! I am expert with 8+ years of experience in such your project. A successful project meets the original goals, and is designed to also support continued business growth. I have a passion for helping my clients that Lagi

$650 USD dalam 7 hari
(1 Ulasan)
2.0
wolfman199311

Dear Client. Thanks for your job posting. My slogan is to satisfy the client's requirement with a low price. However, high quality and fast-deliver is promised. I am interested in your project. Because I have strong sk Lagi

$500 USD dalam 7 hari
(1 Ulasan)
2.0
wictor95

Hi, there. I am C# pr0grammer. I've read your job description carefully and can see what you need clearly. I am a full stack developer with rich experience in C# and I can notice that I am the best fit for your job. I Lagi

$1000 USD dalam 7 hari
(1 Ulasan)
1.7
kyj629

Hi! Nice to meet you. My name is Nemanja, c/c# expert from Russia. I have read your project detail carefully. I have about 10 years of experience. I can complete your job within a few days. please contact me so that w Lagi

$500 USD dalam 7 hari
(1 Ulasan)
1.1
bsld

I think I've an idea of how to do this. Също ние сме от една държава ;D Here is the password: "I am C# pr0grammer"

$250 USD dalam sehari
(0 Ulasan)
0.0