Click here to Skip to main content
15,917,641 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralConvert JIS to ASCII... Pin
Chris Losinger6-Jan-08 5:53
professionalChris Losinger6-Jan-08 5:53 
GeneralRe: Convert JIS to ASCII... Pin
Nemanja Trifunovic6-Jan-08 6:07
Nemanja Trifunovic6-Jan-08 6:07 
GeneralRe: Convert JIS to ASCII... Pin
Chris Losinger6-Jan-08 6:16
professionalChris Losinger6-Jan-08 6:16 
GeneralRe: Convert JIS to ASCII... Pin
Nemanja Trifunovic6-Jan-08 6:28
Nemanja Trifunovic6-Jan-08 6:28 
GeneralRe: Convert JIS to ASCII... Pin
Chris Losinger6-Jan-08 6:41
professionalChris Losinger6-Jan-08 6:41 
GeneralRe: Convert JIS to ASCII... Pin
Michael Dunn6-Jan-08 7:22
sitebuilderMichael Dunn6-Jan-08 7:22 
GeneralRe: Convert JIS to ASCII... Pin
Luc Pattyn6-Jan-08 7:37
sitebuilderLuc Pattyn6-Jan-08 7:37 
GeneralStrings from a c++ Dll to VB 6.0 and vice versa ! Pin
CrocodileBuck6-Jan-08 1:59
CrocodileBuck6-Jan-08 1:59 
Hi together,

i'm trying to pass Strings from a vb project to a c++ Dll and from the Dll back to vb in one function.
It will work from VB to the Dll but not back ?!?!?!?!
I'm trying this now for some days and i couldn't find a solution !
You are my last hope !

Here are the codes:
VB:
<br />
Option Explicit<br />
<br />
Private Declare Function fnWin32DLL02 Lib "E:\WORKING\OMRON\GDT\EigeneDLL\C++ DLL mit VB (Test01)\Win32DLL02.dll" (ByVal testParam As String) As String<br />
<br />
Private Sub Form_Load()<br />
    <br />
    Dim x As String<br />
    x = Space$(5)<br />
    Dim test As String<br />
    test = Space$(20)<br />
    <br />
    test = "Übergabe aus VB"<br />
    x = fnWin32DLL02(test)<br />
    MsgBox "X ist: " & x<br />
<br />
End Sub<br />


Dll cpp:
<br />
WIN32DLL02_API BSTR fnWin32DLL02(BSTR s)<br />
{<br />
		BSTR x;<br />
<br />
		x = SysAllocString((BSTR)"abcde");<br />
	 	MessageBox(NULL,(LPCSTR)s,"Info",MB_OK);<br />
<br />
		SysFreeString(s);<br />
		SysFreeString(x);<br />
<br />
		return x;<br />
}<br />


Dll.h
<br />
WIN32DLL02_API BSTR fnWin32DLL02(BSTR);<br />



I hope it is not too much code but it is the best way to show you my problem.



Many, many thanx
hopefully
Croc
QuestionRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
CPallini6-Jan-08 2:59
mveCPallini6-Jan-08 2:59 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
CrocodileBuck6-Jan-08 3:06
CrocodileBuck6-Jan-08 3:06 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
CPallini6-Jan-08 3:21
mveCPallini6-Jan-08 3:21 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
CrocodileBuck6-Jan-08 3:26
CrocodileBuck6-Jan-08 3:26 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
CPallini6-Jan-08 4:01
mveCPallini6-Jan-08 4:01 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
Nemanja Trifunovic6-Jan-08 6:09
Nemanja Trifunovic6-Jan-08 6:09 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
Rajesh R Subramanian6-Jan-08 6:18
professionalRajesh R Subramanian6-Jan-08 6:18 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
Nemanja Trifunovic6-Jan-08 6:30
Nemanja Trifunovic6-Jan-08 6:30 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
Michael Dunn6-Jan-08 7:30
sitebuilderMichael Dunn6-Jan-08 7:30 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
Maxwell Chen6-Jan-08 7:46
Maxwell Chen6-Jan-08 7:46 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
CrocodileBuck7-Jan-08 0:46
CrocodileBuck7-Jan-08 0:46 
GeneralRe: Strings from a c++ Dll to VB 6.0 and vice versa ! Pin
Mike Dimmick6-Jan-08 7:53
Mike Dimmick6-Jan-08 7:53 
GeneralDevice driver Pin
messages5-Jan-08 23:20
messages5-Jan-08 23:20 
GeneralRe: Device driver Pin
Maxwell Chen5-Jan-08 23:39
Maxwell Chen5-Jan-08 23:39 
GeneralRe: Device driver Pin
messages5-Jan-08 23:56
messages5-Jan-08 23:56 
GeneralRe: Device driver Pin
Maxwell Chen6-Jan-08 0:04
Maxwell Chen6-Jan-08 0:04 
GeneralRe: Device driver Pin
messages6-Jan-08 0:30
messages6-Jan-08 0:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.