Hi,
I am sorry to keep bothering, but I am having trouble now compiling my CIN,
because of a number of errors. I am not very knowledgable about how the value
of my string passes through, so I woudl appreciate any help I could get.
I am using Microsoft visual C++ 6.0, by the way.
Some key elements of my code are:
#include "extcode.h"
CIN MgErr CINRun(LStrHandle var1);
CIN MgErr CINRun(LStrHandle var1) {
void writecmd (char *s);
void main()
{
char *message;
message=var1;
initialize();
/* RESET THE PC21 */
writecmd(message);
}
void writecmd(char *s)
{
while (*s)
writech (*s++);
return;
}
void writech ( char alpha )
{
while (!(inp(address+1) & IDB_M));
outp (address,alpha);
outp (address+1, CHAR_READY);
whil
e (inp(address+1) & IDB_M);
outp(address+1,CB);
while (!(inp(address+1) & IDB_M));
return;
}
so, this code takes the string that I pass to the CIN, that string being
var1, and names it message, then runs the routine writecmd to write that
string, as the pointer goes along te string, until the end. However, this
doesnt work. In my compiler I get the error:
C:\Program Files\National Instruments\LabVIEW\Roa\move.c(44) : warning C4047:
'=' : 'char *' differs in levels of indirection from 'struct LStr ** '
so the LStr that was created by labview is a pointer to a pointer. However,
I have no clue how to then, baced upon my current code, give the string message
the value of var1, and then send it via writecmd. Any help is most appreciated.
I am not very familiar with CINs, so there lies the root of my probelm, and
I am only marginal familiar with C++, so I thank you for your help.
JMH