Click here to Skip to main content
15,913,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUsing RFX_Text_Bulk Pin
Larry Mills Sr12-Dec-09 13:35
Larry Mills Sr12-Dec-09 13:35 
AnswerRe: Using RFX_Text_Bulk Pin
Richard MacCutchan12-Dec-09 23:12
mveRichard MacCutchan12-Dec-09 23:12 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 3:02
Larry Mills Sr13-Dec-09 3:02 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 3:18
mveRichard MacCutchan13-Dec-09 3:18 
GeneralRe: Using RFX_Text_Bulk [modified] Pin
Larry Mills Sr13-Dec-09 4:28
Larry Mills Sr13-Dec-09 4:28 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 4:50
mveRichard MacCutchan13-Dec-09 4:50 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 6:18
Larry Mills Sr13-Dec-09 6:18 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 6:47
mveRichard MacCutchan13-Dec-09 6:47 
Larry Mills Sr wrote:
RFX_Text_Bulk(pFX, _T("[Instructions]"), (LPSTR *)&m_Instructions,(long**)prgLengths,nMaxLength);//doesn't work


I think you are trying to make something that which it is not, by the use of casts; if you'll pardon my circumlocution.

The third field of the RFX_Text_Bulk() call must be "A pointer to an array of LPSTR values", as defined in my previous post. The for loop initialises each entry to a buffer that can hold up to the maximum length of data for the column in question. However you are trying to cast the address of a CString to an array of pointers, which will not work.

However, having looked again at what you are doing I am getting the feeling that the RFX_Text_Bulk() call is not what you need, you should be using the RFX_Text() call, the same as all the other fields, but with a nMaxLength value thus:
RFX_Text(pFX, _T("[Instructions]"), m_Instructions, 1024);

I guess you may have been confused by the definition on the MSDN page[^]. Where it says int nMaxLength = 255, in the function definition, which just means that if you do not specifiy a value for this field the compiler will automatically use 255. You are still at liberty to use a smaller or larger value in the range [1 to INT_MAX].
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 9:20
Larry Mills Sr13-Dec-09 9:20 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 9:48
mveRichard MacCutchan13-Dec-09 9:48 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 23:19
mveRichard MacCutchan13-Dec-09 23:19 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr14-Dec-09 0:56
Larry Mills Sr14-Dec-09 0:56 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan14-Dec-09 4:48
mveRichard MacCutchan14-Dec-09 4:48 
QuestionSDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
sharion12-Dec-09 7:36
sharion12-Dec-09 7:36 
AnswerRe: SDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
Cedric Moonen12-Dec-09 22:18
Cedric Moonen12-Dec-09 22:18 
GeneralRe: SDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
sharion13-Dec-09 5:48
sharion13-Dec-09 5:48 
QuestionI can't get MAC by GetAdaptersAddresses [modified] Pin
DavidBrother12-Dec-09 4:57
DavidBrother12-Dec-09 4:57 
AnswerRe: I can't get MAC by GetAdaptersAddresses Pin
DavidBrother12-Dec-09 5:27
DavidBrother12-Dec-09 5:27 
GeneralRe: I can't get MAC by GetAdaptersAddresses Pin
Richard MacCutchan12-Dec-09 6:06
mveRichard MacCutchan12-Dec-09 6:06 
AnswerRe: I can't get MAC by GetAdaptersAddresses Pin
Richard MacCutchan12-Dec-09 6:11
mveRichard MacCutchan12-Dec-09 6:11 
GeneralRe: I can't get MAC by GetAdaptersAddresses Pin
DavidBrother12-Dec-09 16:34
DavidBrother12-Dec-09 16:34 
GeneralRe: I can't get MAC by GetAdaptersAddresses Pin
DavidBrother12-Dec-09 17:29
DavidBrother12-Dec-09 17:29 
QuestionTAPI send data Pin
cmos12-Dec-09 2:12
cmos12-Dec-09 2:12 
AnswerRe: TAPI send data Pin
Richard MacCutchan12-Dec-09 2:51
mveRichard MacCutchan12-Dec-09 2:51 
GeneralRe: TAPI send data Pin
cmos12-Dec-09 4:11
cmos12-Dec-09 4:11 

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.