TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
andrlage
NA
10
0
Show Windows Form in native client
May 10 2011 1:32 PM
I'm doing com interop from a native client.
The native client uses a native dll to call managed server dll.
All I want is to display a simple form when it load in my native application.
I really appreciate your help/thoughts on this.
Sincerely
Andla
------------------------------------------------------
This is the server
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.Runtime.InteropServices;
namespace Server1
{
[Guid("?????????????????")]
public interface IPelle
{
string ShowPelle();
}
[Guid("?????????????????")]
public class PelleClass : IPelle
{
public string ShowPelle()
{
Form1 test = new Form1();
test.Activate();
System.Threading.Thread.Sleep(5000);
return "Pelle 1 was here";
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
This is the client native dll:
IPellePtr pelleptr;
HRESULT hr2 = pelleptr.CreateInstance(__uuidof(PelleClass));
if (SUCCEEDED(hr2))
{
MessageBox(0,pelleptr->ShowPelle(),"",0);
}
Reply
Answers (
10
)
ACR122 SDK and Credit Card Data
Legacy VB6 app replacement.