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

Managed C++/CLI

 
GeneralRe: How can i use time ? Pin
ShermansLagoon7-Jan-07 23:05
ShermansLagoon7-Jan-07 23:05 
AnswerRe: How can i use time ? Pin
Christian Graus8-Jan-07 9:39
protectorChristian Graus8-Jan-07 9:39 
QuestionHow to execute a function at schedule time? Pin
Banks K7-Jan-07 21:46
Banks K7-Jan-07 21:46 
AnswerRe: How to execute a function at schedule time? Pin
Christian Graus8-Jan-07 9:40
protectorChristian Graus8-Jan-07 9:40 
QuestionHelp with C++ Pin
Member 36662707-Jan-07 11:03
Member 36662707-Jan-07 11:03 
AnswerRe: Help with C++ Pin
Christian Graus7-Jan-07 15:21
protectorChristian Graus7-Jan-07 15:21 
GeneralRe: Help with C++ Pin
Jun Du8-Jan-07 14:03
Jun Du8-Jan-07 14:03 
QuestionMS VC ++ Dot NET 2003: PtrToStringChars Error. Pin
Madhu_TN7-Jan-07 6:31
Madhu_TN7-Jan-07 6:31 
Hi All,
I get the following compilation error:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\cstringt.h(875): error C2664: 'PtrToStringChars' : cannot convert parameter 1 from 'unsigned char *' to 'const System::String __gc *'

The code segemnt is:
#pragma once
#pragma managed
void CDailyRep::OnBnClickedNewreportsOk()
{
/*********************************************************/

CrystalDecisions::CrystalReports::Engine::ReportDocument * crReportDocument = new ReportDocument();
// ReportDocument::FileName = "BATCH.RPT" ;
// ReportDocument::FilePath = "c:\\QpayReports_CR10\\" ;
crReportDocument->Load(L"C:\\QpayReports_CR10\\Batch.RPT",OpenReportMethod::OpenReportByTempCopy);
// crReportDocument->Load(( System::String __gc*)L"c:\\QpayReports_CR10\\BATCH.RPT"); // ,OpenReportMethod::OpenReportByTempCopy);
// crReportDocument->Load("c:\\QpayReports_CR10\\BATCH.RPT"); // ,OpenReportMethod::OpenReportByTempCopy);
// crReportDocument->Load(reportDocument) ;

// char * file1 = "c:\\QpayReports_CR10\\BATCH.RPT";
// wchar_t *file1 = L"c:\\QpayReports_CR10\\BATCH.RPT";
// String* file = System::Runtime::InteropServices::Marshal.PtrToStringAnsi(file1[0]);
// String* file = Marshal::PtrToStringAnsi("c:\\QpayReports_CR10\\BATCH.RPT");
// String* file = Marshal::PtrToStringAnsi(file1);
// String *file = __gc new String(file1); // char *.
// String *file = __gc new String("c:\\QpayReports_CR10\\BATCH.RPT"); // char *.

// String *file = __gc new String("c:\\QpayReports_CR10\\BATCH.RPT"); // char *.
// String *file
// crReportDocument->Load((String *)file);
// crReportDocument->Load(__gc new String("c:\\QpayReports_CR10\\BATCH.RPT"));
// crReportDocument->Load((__wchar_t)L"c:\\QpayReports_CR10\\BATCH.RPT");

My command lin ios :
/G7 /GA /I "C:\TUXEDO\include" /I "C:\Program Files\Common Files\Crystal Decisions\2.5\managed" /AI "C:\Program Files\Common Files\Crystal Decisions\2.5\managed\en" /AI ".\Release" /D "NDEBUG" /D "_DWIN32" /D "WIN32" /D "_WINDOWS" /D "WINNT" /D "_AFXDLL" /D "_MBCS" /FD /MD /GS /J /Zc:wchar_t /Yu"stdafx.h" /Fp".\Release/Qpay.pch" /Fo".\Release/" /Fd".\Release/vc7.0.pbd" /W3 /nologo /c /Zi /clr /TP

No matter what i use, the agrument passed to PtrToStringChars is always an unsigned char *. I am at the end of my wits can any one please help?
Thanks,
MadhuSigh | :sigh:
AnswerRe: MS VC ++ Dot NET 2003: PtrToStringChars Error. Pin
Mark Salsbery10-Jan-07 13:46
Mark Salsbery10-Jan-07 13:46 
GeneralRe: MS VC ++ Dot NET 2003: PtrToStringChars Error. Pin
Madhu_TN10-Jan-07 16:04
Madhu_TN10-Jan-07 16:04 
GeneralRe: MS VC ++ Dot NET 2003: PtrToStringChars Error. Pin
Mark Salsbery10-Jan-07 16:10
Mark Salsbery10-Jan-07 16:10 
Questionhelp if any 1 can :) Pin
core996-Jan-07 10:07
core996-Jan-07 10:07 
AnswerRe: help if any 1 can :) Pin
Christian Graus6-Jan-07 10:43
protectorChristian Graus6-Jan-07 10:43 
GeneralRe: help if any 1 can :) Pin
core998-Jan-07 2:10
core998-Jan-07 2:10 
GeneralRe: help if any 1 can :) Pin
Christian Graus8-Jan-07 8:26
protectorChristian Graus8-Jan-07 8:26 
GeneralRe: help if any 1 can :) Pin
indian1438-Jan-07 2:15
indian1438-Jan-07 2:15 
GeneralRe: help if any 1 can :) Pin
Christian Graus8-Jan-07 8:26
protectorChristian Graus8-Jan-07 8:26 
GeneralRe: help if any 1 can :) Pin
indian1438-Jan-07 18:13
indian1438-Jan-07 18:13 
GeneralRe: help if any 1 can :) Pin
Mark Salsbery8-Jan-07 13:26
Mark Salsbery8-Jan-07 13:26 
GeneralRe: help if any 1 can :) Pin
George L. Jackson9-Jan-07 15:44
George L. Jackson9-Jan-07 15:44 
GeneralRe: help if any 1 can :) Pin
core9910-Jan-07 11:34
core9910-Jan-07 11:34 
GeneralRe: help if any 1 can :) Pin
George L. Jackson10-Jan-07 23:53
George L. Jackson10-Jan-07 23:53 
GeneralRe: help if any 1 can :) Pin
core9911-Jan-07 12:31
core9911-Jan-07 12:31 
QuestionHow to Ask Questions [modified] Pin
George L. Jackson5-Jan-07 15:36
George L. Jackson5-Jan-07 15:36 
AnswerRe: How to Ask Questions Pin
Mark Salsbery6-Jan-07 6:58
Mark Salsbery6-Jan-07 6:58 

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.