Code:
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
	LRESULT copyDataResult;
	HWND pOtherWnd = FindWindow(NULL, "WinLirc");
	if (pOtherWnd)
	{
		COPYDATASTRUCT cpd;
		cpd.dwData = 0;
		cpd.cbData = strlen(lpCmdLine);
		cpd.lpData = (void*)lpCmdLine;
		copyDataResult = SendMessage(pOtherWnd,WM_COPYDATA,(WPARAM)hInstance,(LPARAM)&cpd);
        // copyDataResult has value returned by other app
	}
	else
	{
		return 1;
	}
	return 0;
}
The code above is a command line application and I want to do code something similiar but in vb.

So far I managed to get findwindow to work in vb but is having trouble with the sendmessage() API.

How do I convert "(WPARAM)hInstance" and "(LPARAM)&cpd)" to vb6?
I just want it to do a sendmessage() function when I click on a cmd btn