Click here to Skip to main content
15,914,780 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to convert a string from CString to LPTSTR Pin
Roger Stoltz12-Oct-05 1:53
Roger Stoltz12-Oct-05 1:53 
GeneralRe: How to convert a string from CString to LPTSTR Pin
cauvang12-Oct-05 15:21
cauvang12-Oct-05 15:21 
Questionfile handling Pin
karmendra_js11-Oct-05 21:56
karmendra_js11-Oct-05 21:56 
AnswerRe: file handling Pin
Bob Stanneveld11-Oct-05 22:53
Bob Stanneveld11-Oct-05 22:53 
GeneralRe: file handling Pin
karmendra_js11-Oct-05 23:07
karmendra_js11-Oct-05 23:07 
GeneralRe: file handling Pin
Bob Stanneveld12-Oct-05 6:14
Bob Stanneveld12-Oct-05 6:14 
AnswerRe: file handling Pin
krmed12-Oct-05 2:45
krmed12-Oct-05 2:45 
QuestionNot been able to return value from a function in a DLL Pin
Amarelia11-Oct-05 21:42
Amarelia11-Oct-05 21:42 
Hi
I have simple windows DLL.

In my DLL i have a function named as "MyFunc" which contains three parameters from which two are "in" parameter and the third one "out" parameter. I am sure I m getting the value in my third parameter. But when I try to call it using Visual Basic programm, I am not getting the value ? What seems the problem....

I am writing whole code for your reference here..

VC++ DLL Function code :
========================
void __stdcall MyFunc(char *sMyString, long lType, char **sResult)
{

char sTemp[255] = "Mahesh";
*sResult = new char[512];
strcpy(*sResult,"");
strcat(*sResult,sTemp);
........
........
........
strcat(*sResult, "; ");
return;
}


VB Programm Code to test....
===========================

Dim sReference As String

Private Declare Sub MyFunc Lib "C:\....\MyDLL.dll" (ByVal sMyString As String, ByVal PrdID As Long, ByRef sOut As Variant)

Private Sub Command1_Click()

Dim sPrefix As String
Dim sResult As String

sPrefix = "CST"
sReference = Space(27)

Call AiGetLicense(sPrefix, 3, sOut)
MsgBox (sOut)
End Sub

==============================================

Here I get sOut as balnk
But when I debug my DLL i get value in *sResult as "Mahesh;"

What seeems to be the problem ?

Any idea plz ?

Thankx a lot

Amarelia Maehsh
Gujarat
India

AnswerRe: Not been able to return value from a function in a DLL Pin
Prakash Nadar11-Oct-05 22:59
Prakash Nadar11-Oct-05 22:59 
Questionhow to do a priority queue???? Pin
Nadzna11-Oct-05 21:26
Nadzna11-Oct-05 21:26 
AnswerRe: how to do a priority queue???? Pin
Roger Stoltz11-Oct-05 23:44
Roger Stoltz11-Oct-05 23:44 
GeneralRe: how to do a priority queue???? Pin
John M. Drescher12-Oct-05 2:15
John M. Drescher12-Oct-05 2:15 
GeneralRe: how to do a priority queue???? Pin
David Crow12-Oct-05 3:02
David Crow12-Oct-05 3:02 
QuestionNew build configuration ???? Pin
xSoptik11-Oct-05 20:43
xSoptik11-Oct-05 20:43 
AnswerRe: New build configuration ???? Pin
kakan11-Oct-05 21:24
professionalkakan11-Oct-05 21:24 
GeneralRe: New build configuration ???? Pin
xSoptik11-Oct-05 21:40
xSoptik11-Oct-05 21:40 
QuestionAnybody can help me , About VC7 Pin
BaiYunlong11-Oct-05 17:57
BaiYunlong11-Oct-05 17:57 
QuestionAbout class Pin
11-Oct-05 16:06
suss11-Oct-05 16:06 
AnswerRe: About class Pin
Prakash Nadar11-Oct-05 17:40
Prakash Nadar11-Oct-05 17:40 
QuestionGet USB drives label Pin
LiYS11-Oct-05 15:30
LiYS11-Oct-05 15:30 
AnswerRe: Get USB drives label Pin
kakan11-Oct-05 21:43
professionalkakan11-Oct-05 21:43 
GeneralRe: Get USB drives label Pin
LiYS12-Oct-05 3:20
LiYS12-Oct-05 3:20 
Questionprogress bar not working Pin
Ann6611-Oct-05 14:07
sussAnn6611-Oct-05 14:07 
AnswerRe: progress bar not working Pin
Blake V. Miller11-Oct-05 14:30
Blake V. Miller11-Oct-05 14:30 
GeneralRe: progress bar not working Pin
Ann6611-Oct-05 14:52
sussAnn6611-Oct-05 14:52 

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.