..net consumer code
cMain myDll = new cMainClass();
int iSuccess = myDll.DoOrders();
string sErr = "";
if (iSuccess == 0)
sErr = myDll.ErrMsg;
int iClose = myDll.CloseMe();
if (iClose == 1)
return true;
else
{
myLog.WriteIt(myDll.ErrMsg);
return true;
}
vb 6 interfaces only 2 with 1 property for the error msg.
Public Function DoOrders() As Integer
LogIt "Starting Export to Unisys " & Now
If OpenSqlConnection() Then
If GetNewDP2Orders() Then
ProcessDP2Orders
UpdateStatus
DoOrders = 1
Else
DoOrders = 0
End If
Else
DoOrders = 0
End If
LogIt "Finished Exporting to Unisys " & Now
End Function
Public Function CloseMe() As Integer
On Error GoTo errClose
Set cn = Nothing
Set cn2 = Nothing
Set rs = Nothing
Set rs2 = Nothing
Set rs3 = Nothing
Set rsChk = Nothing
Set rsOrderData = Nothing
Set rsDetail = Nothing
CloseMe = 1
Exit Function
errClose:
sErrMessage = "CloseMe Error Number: " & Err.Number & " Desc: " &
Err.Description
CloseMe = 0
End Function
John
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:0c********************************@4ax.com...
Hi JC:
You'll have to post some code to show us what you are doing.
Permission denied msgs happen for a number of different reasons,
sometimes indirectly related to trust and authorization.
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 12 Nov 2004 09:26:47 -0600, "JC" <st**********@hotmail.com>
wrote:
On the second pass through the obj I get this error. This is all running
on
my machine. I used the framework wizard to trust the interop.mydll.dll
assembly, what am I missing, do I force a disposal of the obj or what?
An unhandled exception of type 'System.Security.SecurityException'
occurred
in AutoBiller.exe
Additional information: Permission denied
Thanks,
jc