Avi Dar
September 30th, 2001, 09:49 AM
Hi, I'm a C++ programmer trying to work my way with VB for the first time. I would be grateful if someone could help me out on this one: I'm trying to pass a user defined type variable as a parameter in a call to a method in a C++ server (COM):
I get an error that sais that user defined types may not be passed ByVal, but the MSDN help sais that the default is byRef so can you please help me what I'm doing wrong:
This is the code :
Dim recipeParams as sADCRecipeParams
recipeParams.bstrProductName = "TestProduct111"
recipeParams.bstrLayerName = "Layer_A"
recipeParams.bstrObjectiveName = "BF_20x"
recipeParams.bstrRecipeName = "" 'no Recipe selected
sdiAdcAgent.SelectRecipeForClassification _
recipeParams, bstrLotID, bstrWaferID, _
nSlotNum, nTestNum, lSize, _
aBytes(0), nImageDimX, nImageDimY
TIA,
Avi
I get an error that sais that user defined types may not be passed ByVal, but the MSDN help sais that the default is byRef so can you please help me what I'm doing wrong:
This is the code :
Dim recipeParams as sADCRecipeParams
recipeParams.bstrProductName = "TestProduct111"
recipeParams.bstrLayerName = "Layer_A"
recipeParams.bstrObjectiveName = "BF_20x"
recipeParams.bstrRecipeName = "" 'no Recipe selected
sdiAdcAgent.SelectRecipeForClassification _
recipeParams, bstrLotID, bstrWaferID, _
nSlotNum, nTestNum, lSize, _
aBytes(0), nImageDimX, nImageDimY
TIA,
Avi