Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using CDHtmlDialog Pin
Richard MacCutchan2-Sep-13 21:29
mveRichard MacCutchan2-Sep-13 21:29 
QuestionHow to write vector destructor? Pin
CryptoGnome329-Aug-13 15:36
CryptoGnome329-Aug-13 15:36 
AnswerRe: How to write vector destructor? Pin
SandipG 29-Aug-13 17:59
SandipG 29-Aug-13 17:59 
AnswerRe: How to write vector destructor? Pin
CPallini29-Aug-13 22:16
mveCPallini29-Aug-13 22:16 
AnswerRe: How to write vector destructor? Pin
Freak3029-Aug-13 22:38
Freak3029-Aug-13 22:38 
GeneralRe: How to write vector destructor? Pin
CryptoGnome330-Aug-13 5:45
CryptoGnome330-Aug-13 5:45 
GeneralRe: How to write vector destructor? Pin
Stefan_Lang2-Sep-13 0:36
Stefan_Lang2-Sep-13 0:36 
QuestionHow to pass array from MFC (dialogbased) to win 32 DLL ? Pin
peoria12329-Aug-13 6:31
peoria12329-Aug-13 6:31 
How to pass array from MFC (dialogbased) to win 32 DLL ?

In MFC application I have read csv file and stored 2nd column into into array(Elastmod)how do I pass that array to win 32 DLL?right now it only takes first element of array not all the eelements.

// MFC File

extern "C" __declspec(dllimport)void CommonBinFrame(char Scanfile[_MAX_PATH],float E[25]);

// read .csv file
CString Token;
CString Separator = _T(",");
int Position = 0;
CString strFilePath = ("C:\\dm1.csv");

CString strText;
CStdioFile readFile;
CFileException fileException;

if (readFile.Open(strFilePath, CFile::modeRead, &fileException))
{
while(readFile.ReadString(strText))
{


float Elastmod[25];
float *P;

P= Elastmod;


int Position = 0;

while(strText.Tokenize(Separator, Position)!="")
{


for(int i=0;i<=24;i++)
{

int Position = 0;


Token = strText.Tokenize(Separator, Position);

Token = strText.Tokenize(Separator, Position);

Elastmod[i] = atof(Token);
readFile.ReadString(strText);

}

}
char Scanfile[_MAX_PATH];
CommonBinFrame(Scanfile,Elastmod); // Here I got full array which i wanted to pass to DLL

}
}
else

{
CString strErrorMsg;
strErrorMsg.Format(_T("Can't open file %s , error : %u"),"C:\\dm1.csv" , fileException.m_cause);
AfxMessageBox(strErrorMsg);
}

readFile.Close();

}


//DLL file


extern "C" __declspec(dllexport)void CommonBinFrame(char Scanfile, float *E);
void CommonBinFrame(char Scanfile, float E[])
{

}
Float E[]= only have 1st array element

Thank you.
AnswerRe: How to pass array from MFC (dialogbased) to win 32 DLL ? Pin
Richard Andrew x6429-Aug-13 8:33
professionalRichard Andrew x6429-Aug-13 8:33 
GeneralRe: How to pass array from MFC (dialogbased) to win 32 DLL ? Pin
peoria12329-Aug-13 11:02
peoria12329-Aug-13 11:02 
AnswerRe: How to pass array from MFC (dialogbased) to win 32 DLL ? Pin
Richard Andrew x6429-Aug-13 11:05
professionalRichard Andrew x6429-Aug-13 11:05 
AnswerRe: How to pass array from MFC (dialogbased) to win 32 DLL ? Pin
Richard MacCutchan29-Aug-13 21:06
mveRichard MacCutchan29-Aug-13 21:06 
QuestionPassing "this" pointer to Post/SendMessage Pin
Vaclav_28-Aug-13 6:12
Vaclav_28-Aug-13 6:12 
AnswerRe: Passing "this" pointer to Post/SendMessage Pin
Richard MacCutchan28-Aug-13 6:21
mveRichard MacCutchan28-Aug-13 6:21 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
Vaclav_28-Aug-13 9:04
Vaclav_28-Aug-13 9:04 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
Richard MacCutchan28-Aug-13 21:14
mveRichard MacCutchan28-Aug-13 21:14 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
Vaclav_29-Aug-13 3:54
Vaclav_29-Aug-13 3:54 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
Richard MacCutchan29-Aug-13 4:23
mveRichard MacCutchan29-Aug-13 4:23 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
Vaclav_29-Aug-13 13:03
Vaclav_29-Aug-13 13:03 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
Richard MacCutchan29-Aug-13 20:50
mveRichard MacCutchan29-Aug-13 20:50 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
pasztorpisti28-Aug-13 6:29
pasztorpisti28-Aug-13 6:29 
AnswerRe: Passing "this" pointer to Post/SendMessage SOLVED Pin
Vaclav_28-Aug-13 14:33
Vaclav_28-Aug-13 14:33 
AnswerRe: Passing "this" pointer to Post/SendMessage Pin
ThatsAlok28-Aug-13 23:41
ThatsAlok28-Aug-13 23:41 
GeneralRe: Passing "this" pointer to Post/SendMessage Pin
Vaclav_29-Aug-13 3:48
Vaclav_29-Aug-13 3:48 
QuestionCListCtrl: Columns do not resize, if more number of columns are added Pin
Md Saleem Navalur27-Aug-13 21:25
Md Saleem Navalur27-Aug-13 21:25 

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.