Click here to Skip to main content
15,890,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: RegQueryValueEx Problem! Pin
bosfan18-Dec-06 3:04
bosfan18-Dec-06 3:04 
GeneralRe: RegQueryValueEx Problem! Pin
krmed18-Dec-06 2:53
krmed18-Dec-06 2:53 
AnswerRe: RegQueryValueEx Problem! Pin
Hamid_RT18-Dec-06 0:05
Hamid_RT18-Dec-06 0:05 
AnswerRe: RegQueryValueEx Problem! Pin
kakan18-Dec-06 0:16
professionalkakan18-Dec-06 0:16 
QuestionUnhandled execption in ariel.exe(APIOCX):0xC0000005 :Access violation Pin
With_problem17-Dec-06 21:42
With_problem17-Dec-06 21:42 
Questionconverting unsigned char array to bstr Pin
dekta17-Dec-06 20:54
dekta17-Dec-06 20:54 
AnswerRe: converting unsigned char array to bstr Pin
CPallini17-Dec-06 23:02
mveCPallini17-Dec-06 23:02 
GeneralREpost : converting unsigned char array to bstr Pin
dekta18-Dec-06 16:08
dekta18-Dec-06 16:08 
pls help...another VC++ newbie here.

i tried to return string values from this particular dll im workin on thru BSTR. this return value shall be recievd by a VB application

this DLL im workin on is not a MFC dll but a win32 dll.
using the code block below...i tested if i could really
return a string thru BSTR, and it worked jst fine.

BSTR Message;
char *buff = "This works fine" ;
Message = SysAllocStringByteLen (buff , lstrlen(buff));
return Message;


but when i tried to return the values im really supposed to return ....i cant find a way to make it work.the program/dll must return the values of an array of unsigned char[].

heres what i did.

BSTR Message;
unsigned char vst[121];
vst[0] = 0x00;//these are the kind of values i expected it to return
vst[1] = 0x17;
vst[2] = 0xFF;
..
..(and so on..)
vst[20] = 0xFF;

CHAR theChar;
CHAR* pChar = &theChar;
res = VarI1FromUI1( vst[10] ,pChar);
Message = SysAllocStringByteLen (pChar, lstrlen(pChar));
return Message;

The code above shouldve returned the converted values of array GETvst[10] but only resulted wierd values i cant understand...i should be returning the values of array vst[10] to vst[16]....
ive read a lot of article abt this problem but cant find the solution


sorry for my previous typo errors gurus


GeneralRe: REpost : converting unsigned char array to bstr Pin
CPallini18-Dec-06 23:57
mveCPallini18-Dec-06 23:57 
Questiondetecting the FTP connection break down. Pin
vijay_aroli17-Dec-06 20:31
vijay_aroli17-Dec-06 20:31 
GeneralRe: detecting the FTP connection break down. Pin
Mila02517-Dec-06 20:40
Mila02517-Dec-06 20:40 
GeneralRe: detecting the FTP connection break down. Pin
vijay_aroli17-Dec-06 20:52
vijay_aroli17-Dec-06 20:52 
GeneralRe: detecting the FTP connection break down. Pin
Mila02517-Dec-06 21:03
Mila02517-Dec-06 21:03 
GeneralRe: detecting the FTP connection break down. Pin
vijay_aroli17-Dec-06 21:31
vijay_aroli17-Dec-06 21:31 
Questionwhat is best compiler Pin
siaswar17-Dec-06 20:29
siaswar17-Dec-06 20:29 
AnswerRe: what is best compiler Pin
Cedric Moonen17-Dec-06 20:48
Cedric Moonen17-Dec-06 20:48 
GeneralRe: what is best compiler Pin
siaswar17-Dec-06 21:00
siaswar17-Dec-06 21:00 
GeneralRe: what is best compiler Pin
Cedric Moonen17-Dec-06 21:25
Cedric Moonen17-Dec-06 21:25 
QuestionDialog box is not getting displayed [modified] Pin
Dinu_IP17-Dec-06 19:44
Dinu_IP17-Dec-06 19:44 
Questionassembly Pin
Waldermort17-Dec-06 18:55
Waldermort17-Dec-06 18:55 
AnswerRe: assembly Pin
Mohammad A Gdeisat17-Dec-06 22:22
Mohammad A Gdeisat17-Dec-06 22:22 
QuestionRichedit text box Pin
zareee17-Dec-06 18:32
zareee17-Dec-06 18:32 
AnswerRe: Richedit text box Pin
prasad_som17-Dec-06 18:37
prasad_som17-Dec-06 18:37 
GeneralRe: Richedit text box Pin
zareee17-Dec-06 19:10
zareee17-Dec-06 19:10 
QuestionAbout CD/DVD Writing Software Pin
yudhisthira17-Dec-06 17:53
yudhisthira17-Dec-06 17:53 

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.