Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Passing UDT Array to function


1 reply to this topic

BobRouse

BobRouse
  • Members
  • 82 posts

Posted 17 February 2003 - 23:49

I have an array of a user-defined-type that I am trying to pass to a function. When it gets to the function, however, I get an error "Object reference not set".  Here are some code snippets:

//======================================
#define ServerDB 0
#define AdminLogin 1
#define DBCreation 2
#define UserLogin 3

typedef SHOWSCREENS
begin
   BOOL    Enabled;
   BOOL    Displayed;
   STRING  Title[50];
   STRING  Desc[200];
   STRING  Message[500];
   NUMBER  Flag;
end;

SHOWSCREENS aNetDBScreens(4);
SHOWSCREENS aProdDBScreens(4);
SHOWSCREENS aWhseDBScreens(4);

prototype DB_SetDBScreenValues(HWND, BYREF VARIANT, DBDATA POINTER, NUMBER);

// Calling
DB_SetDBScreenValues(hInstall, aNetDBScreens, precNetDB, PROD_DB_NETUITIVE);

// Actual function
function DB_SetDBScreenValues(hInstall, aDBScreens, recDBData, nvDatabase)

begin
   aDBScreens(ServerDB).Enabled = TRUE;  // errors here
end;
//==================================

Note:
   IS Dev 7.04
   "Standard" type project

Any help would be appreciated...
Bob Rouse
Netuitive, Inc.

BobRouse

BobRouse
  • Members
  • 82 posts

Posted 18 February 2003 - 21:32

To all future developers who find this thread: The workaround as described in KnowledgeBase article Q105822 worked for me.
Bob Rouse
Netuitive, Inc.