OK.  I was able to change my project platform from X64 to x86.  That might at 
least tell my VS2008 console application to run in 32 bit mode.
However now I get this error:

FileNotFoundException was unhandled
The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Seems like progress at least but this error occurred again on the .Login step 
of my code again.
Does this mean the BMC.ARSystem.DLL is not registered properly to .NET?
I did reference it in the "Add Reference" window and ran the regasm for it 
(under Framework not Framework64) and it seemed to setup properly from that.


Thanks
Peter Lammey
ESPN IT Packaging and Automation
860-766-4761



________________________________
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor
Sent: Thursday, April 22, 2010 6:03 PM
To: arslist@ARSLIST.ORG
Subject: Re: .NET API for 7.X

**
On Windows, you only have access to the 32-bit Remedy native APIs, and the .NET 
API uses those DLLs to implement the functionality provided by the .NET API - 
the .NET API is pretty much a wrapper over the C API and uses the C API to do 
the actual work.  32-bit DLLs can only be used in a 32-bit process, so the .NET 
process that gets executed needs to run in 32-bit mode (that is, with a 32-bit 
version of the CLR).  On a 64-bit OS, it will run a 64-bit version of the CLR 
by default.  When it runs in the 64-bit CLR and then tries to load the 32-bit 
native DLLs, it generates this error, because you can't use a 32-bit DLL in a 
64-bit process.
If you are using a full version of Visual Studio (that is, not VS Express), you 
can set a build option that tells it to add a flag in the application that 
tells Windows to run it using the 32-bit CLR instead - you need to do that if 
you want to run it on a 64-bit OS.  If you are building it with Visual Studio 
Express, that option is not available, so the application will always run using 
the 64-bit CLR on 64-bit machines, generating this error.  You might be able to 
get around that if you're brave enough to figure out all the command line 
arguments to the compiler necessary to build the application, add the 
corresponding argument to the list and build it manually instead of within VS...
Unfortunately, I'm not certain anymore what the option is, but I think it might 
be related to architecture or something.  I can look it up again, if you're not 
able to find it.  It took me a fair bit of looking before I found the relevant 
option and discovered that I couldn't use it, because I'm using VS Express...
I hope that helps a little.  In any case, that's the cause of what you're 
seeing.
Lyle
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Lammey, Peter A.
Sent: Thursday, April 22, 2010 3:11 PM
To: arslist@ARSLIST.ORG
Subject: .NET API for 7.X
**
I have downloaded and performed the steps to register and added environment 
path variables for the .NET API for 7.1 and even tried .NET 7.5 on a Windows 
2008 Server.
However, when I tried the API connection to our Remedy BMC 7.01 server using 
the code I found on it we keep receiving this error:
{" is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)"}
This error occurs from this .NET code (highlighted in green below:)
Public Function GetRemedyObject(ByVal pRemedyServer As String, ByVal pRemedyUID 
As String, ByVal pRemedyPWD As String, ByVal pRemedyPort As String, ByVal 
pRemedyRPCProgramNum As String) As BMC.ARSystem.Server
        Call objArSystemPub.Login(pRemedyServer, pRemedyUID, pRemedyPWD, "")
        Call 
objArSystemPub.SetServerPort(Microsoft.VisualBasic.Conversion.Int(pRemedyPort), 
Microsoft.VisualBasic.Conversion.Int(pRemedyRPCProgramNum))
        GetRemedyObject = objArSystemPub
        Return objArSystemPub
    End Function
Does anyone in the list have any ideas what might be causing this error?
We have run through and added system environment variables for LIB and PATH and 
added to the PATH variable where the API files are (that were downloaded from 
the ARAPI75.NET.ZIP) and restarted the server but still no luck.
Is there other steps that need to be followed that will correct this error?
Thanks
Peter Lammey
ESPN IT Packaging and Automation
860-766-4761
_attend WWRUG10 www.wwrug.com ARSlist: "Where the Answers Are"_


NOTICE: This email message is for the sole use of the intended recipient(s) and 
may contain confidential and privileged information. Any unauthorized review, 
use, disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply email and destroy all copies of 
the original message.

_attend WWRUG10 www.wwrug.com ARSlist: "Where the Answers Are"_
________________________________
Please consider the environment before printing this e-mail.

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: "Where the Answers Are"

Reply via email to