Jump to content
Software FX Community

Export function with Visual Studio .NET


User (Legacy)
 Share

Recommended Posts

Hi everyone,

I'm upgrading from Visual Studio 6.0 to Visual Studio

.NET 7.0 and I have some troubles with the export functions. My program

works perfectly in Windows 2000 and XP with Visual Studio 6.0 but not with

.NET. I create a file, I'm writing some text lines in it and after I want

to export Chart data from ChartFX Client-Server 5.0 into my file. Here's my

code:

CStdioFile savedFile (fileTemp, CFile::modeReadWrite |CFile::modeCreate);

savedFile.WriteString(_T("#\n"));

savedFile.SeekToEnd();

VT(&v) = VT_UI4;

V_UI4(&v) = savedFile;

m_pChartFX->Export(CHART_DATA,v);

savedFile.SeekToBegin();

This code works with VS6.0 but not with .NET, I don't understand. Can you

help me ?

Thanks a lot,

Ren

Link to comment
Share on other sites

This code doesn't work in ANY version of VC++.

The correct code would be:

CStdioFile savedFile ("d:\\temp\\filetest.cfx2", CFile::modeReadWrite

|CFile::modeCreate);

VARIANT v;

savedFile.WriteString(_T("#\n"));

savedFile.Flush();

savedFile.SeekToEnd();

V_VT(&v) = VT_UI4;

V_UI4(&v) = (ULONG) savedFile.m_hFile;

m_pChartFX->Export(CHART_DATA,v);

savedFile.SeekToBegin();

This code works in any VS 6.0 and VS 2003.

--

FP

Software FX

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...