Click here to Skip to main content
15,902,893 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Change text color Pin
Andreoli Carlo25-Mar-10 6:01
professionalAndreoli Carlo25-Mar-10 6:01 
AnswerRe: Change text color Pin
Richard MacCutchan25-Mar-10 6:01
mveRichard MacCutchan25-Mar-10 6:01 
QuestionWindows XP Problems since updating from VS2005 to VS2008 Pin
Joschwenk66623-Mar-10 11:07
Joschwenk66623-Mar-10 11:07 
AnswerRe: Windows XP Problems since updating from VS2005 to VS2008 Pin
T210224-Mar-10 19:18
T210224-Mar-10 19:18 
QuestionProblem : Converting a System::String^ to char[512] Pin
vidasco18-Mar-10 1:07
vidasco18-Mar-10 1:07 
AnswerRe: Problem : Converting a System::String^ to char[512] Pin
Andreoli Carlo18-Mar-10 1:21
professionalAndreoli Carlo18-Mar-10 1:21 
AnswerRe: Problem : Converting a System::String^ to char[512] Pin
Richard MacCutchan18-Mar-10 3:20
mveRichard MacCutchan18-Mar-10 3:20 
Questionextend class and casting Pin
Andreoli Carlo18-Mar-10 0:20
professionalAndreoli Carlo18-Mar-10 0:20 
AnswerRe: extend class and casting Pin
teejayem18-Mar-10 8:15
teejayem18-Mar-10 8:15 
GeneralRe: extend class and casting Pin
Andreoli Carlo18-Mar-10 22:05
professionalAndreoli Carlo18-Mar-10 22:05 
QuestionConvert CString array to System::String Pin
Anu_Bala16-Mar-10 18:14
Anu_Bala16-Mar-10 18:14 
AnswerRe: Convert CString array to System::String Pin
Richard MacCutchan16-Mar-10 22:20
mveRichard MacCutchan16-Mar-10 22:20 
AnswerRe: Convert CString array to System::String Pin
teejayem17-Mar-10 2:08
teejayem17-Mar-10 2:08 
AnswerRe: Convert CString array to System::String Pin
T210228-Mar-10 22:07
T210228-Mar-10 22:07 
AnswerRe: Convert CString array to System::String Pin
@Intersect☺™15-Apr-10 0:58
professional@Intersect☺™15-Apr-10 0:58 
Questioncalling a winapi function from managed code Pin
david sturzenegger15-Mar-10 6:04
david sturzenegger15-Mar-10 6:04 
hi, i have a problem when calling from the managed code the function

capGetDriverDescription(
WORD wDriverIndex,
LPTSTR lpszName,
INT cbName,
LPTSTR lpszVer,
INT cbVer
);
from avicap32.dll. the function is described in detail in http://msdn.microsoft.com/en-us/library/dd756909%28VS.85%29.aspx[^]. Basically it writes the name and description of videoinput device number wDriverIndex to the passed strings lpszName and lpszVer which have length cbName and cbVer respectively (better put, to the corresponding memory). the relevant code is the following

-----------------------------------------

[DllImport("avicap32.dll")] extern "C" bool capGetDriverDescription(UInt16, String^, int, String^, int);

.....

int i_nameLen = 100;
int i_verLen = 100;
String^ s_name = gcnew String('x',i_verLen);
String^ s_ver = gcnew String('x',i_verLen);

result = capGetDriverDescription(x, s_name, i_nameLen, s_ver, i_verLen);

------------------------------------------

the function returns for x=0 true and for x=1 false which is expected since only one webcam is attached to my computer. but the returned strings s_name and s_ver are unchanged. probably managed and unmanaged code dont use the same memory which makes it somewhat difficult to pass pointers.... what is the alternative?
btw, its my first time calling unmanaged code from managed one, so probably the answer will be quite obvious. thanks in advance!

david

ps: is there a smarter way to allocate memory to the strings? (probably yes...)
AnswerRe: calling a winapi function from managed code Pin
Ghydo19-Mar-10 7:34
Ghydo19-Mar-10 7:34 
QuestionSome help needed with class and this pointer Pin
nah133712-Mar-10 13:06
nah133712-Mar-10 13:06 
AnswerRe: Some help needed with class and this pointer Pin
Garth J Lancaster12-Mar-10 15:14
professionalGarth J Lancaster12-Mar-10 15:14 
GeneralRe: Some help needed with class and this pointer Pin
nah133712-Mar-10 20:57
nah133712-Mar-10 20:57 
GeneralRe: Some help needed with class and this pointer Pin
Richard MacCutchan12-Mar-10 22:21
mveRichard MacCutchan12-Mar-10 22:21 
QuestionManaged c++ std::string not accessible in unmanaged c++ Pin
Radh-e-sham11-Mar-10 20:42
Radh-e-sham11-Mar-10 20:42 
AnswerRe: Managed c++ std::string not accessible in unmanaged c++ Pin
KarstenK11-Mar-10 21:46
mveKarstenK11-Mar-10 21:46 
AnswerRe: Managed c++ std::string not accessible in unmanaged c++ Pin
T210228-Mar-10 22:10
T210228-Mar-10 22:10 
Questionsse 2-D Inner product and transpose Pin
SMART LUBOBYA4-Mar-10 4:24
SMART LUBOBYA4-Mar-10 4:24 

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.