FooBar.h
#pragma once
#include "Msg.h"
using namespace System;
namespace FooBar {
public ref class Class1
{
Msg^ msg = gcnew Msg();
};
}
Msg.h
#pragma once
#include <Windows.h>
#pragma comment (lib, "user32.lib")
ref class Msg
{
public:
Msg();
};
Msg.cpp
#include "pch.h"
#include "Msg.h"
Msg::Msg() {
MessageBox(0, L"FooBar", L"FooBar", MB_OK);
}
I'd successfully compile a FooBar.dll, but when running it with "rundll32 FooBar.dll" it does nothing, but it doesn't tell me that entry point should be defined at all.
I'm basically trying to do simple DLL that can be ran as test to popup a messagebox as result.