Hi there. Im having a problem with a loop inside a C++ dll being called from VB. I want this loop to update a global variable, but when I call the function the variable does not update the first time round, but does so every subsequent time.
This is how I am trying to update the variable.
else
{
::nScore = nHighest;
if (nScore != 0)
{
::nColourOn++;
}
}
As a workaroud I am forcing the variable to be what I want in the VB code, but am not happy with this solution. Does anyone have any idea what might be causing this?
Many Thanks.