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
AMunk-Wendlandt
NA
7
0
process communication between vb6 and c#
Dec 8 2004 3:40 AM
Hello, i have two applications (once in vb6 and once in c#) which have to communicate together. They have to send and receive strings. I used api-method sendmessage, but it doesn't work. in vb: Private Declare Function SendMessageByStr& Lib "user32" Alias "SendMessageA" _ (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal _ lParam As String) [..] Call SendMessageByStr(hwndTarget, MessageId, 4, "test") in C#: unsafe protected override void WndProc(ref Message m) { if (m.Msg == VB6_TO_CSHARP_MessageId.ToInt32()) { try { string url = new string((char*)(m.LParam.ToPointer()), 0, m.WParam.ToInt32()); } catch(Exception ex) { MessageBox.Show(ex.Message); } } base.WndProc(ref m); } There is an exception by reading string. Has anyone sourcecode to send and receive strings from VB6 and C# applications? As an example project use this from codeproject (this project only send normaly messages, no strings): http://www.codeproject.com/dotnet/VB6andVBNETWindowMessages.asp Can you help? Sincerely, Andre
Reply
Answers (
6
)
app.config file of C# with database connectivity
What's the meaning of public MyException(string str):base (str)