Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Problem: Register a DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem: Register a DLL

    I am having some difficulties attempting to register a DLL with in my program.
    Note: This same DLL is working in vb (.net) and in C# - so I am confident that the DLL is good
    I am now trying trouble shooting the issue � I am taking it step by step.
    Step 1 � Get Alpha to recognize the Assembly
    dim Sv as DotNet::Services
    dim assy as DotNet::AssemblyReference
    assy.FileName="C:\Meriam\PayGateWayNet.DLL" 'Hardcode the path while testing
    if .not. file.exists(assy.FileName)
    ui_msg_box("can't find file",assy.FileName)
    end
    end if
    xx=sv.RegisterAssembly("PayGateWay",assy)
    Debug(1)



    Sv.callresult.text shows
    �errror in DotNet::Services::RegisterAssembly - Exception loading assembly �Could not load file or assembly 'file:///C:\Meriam\PayGateWayNet.DLL' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131�

    (Note I have tried several other DLL and the call results always showed successful)

    Is there anyone out there that can help me with this issue and/or which direction to go next.

    #2
    Re: Problem: Register a DLL

    Code:
    dim cthour as c = ""; dim ctmin as c = ""; dim ctsec as c = ""; dim ctmon as c = ""; dim ctday as c = ""; dim ctyr as c = ""
    	Dim global Sv as DotNet::Services
    	Dim global Assy as DotNet::AssemblyReference
    	Dim global Namespace as C = "MyNamespace"
    	'dll information is stored in dllinfo table which should always be a 1 record table. Dll_path should have the backslash.
    	qorder = "";qfilter = "isnotblank(\"dll_path\")"
    	'get the full path + dll name from the dll_info table
    	dllinfo = "if(right(Alltrim(dll_path),1)<>Chr(92),Alltrim(dll_path + chr(92)),alltrim(dll_path))+alltrim(dll_name)"
    	tname2 = app_path + "hp_dll_info"
    	Assy.FileName = table.external_record_content_get(tname2,dllinfo,qorder,qfilter)
    	if .not. file.exists(assy.filename) then
    		msg_txt = "The RSIDotNetDLL file is not available." + Crlf(2) + "You can't communicate with the HandPunch until the DLL file is installed."
    		'SendEmail(lv,msg_txt)
    		logstat = "Fail"
    		logerror = "No RSIDotNetDLL file"
    			PutLogStatus(lv)
    			'goto Last
    			msg_txt = "No .Net dll file. The application will close."
    			MYL(msg_txt)
    			A5.Close()
    			End
    	end if
    	rs = sv.RegisterAssembly(NameSpace,Assy)
    	if .not. rs then
    		msg_txt = "Urgent: error registering assembly " + Assy.fileName + sv.CallResult.Text
    		msg_txt = msg_txt + Crlf(2) + "Please make sure that the RSIDotNetDLL dll and its associated files have been properly installed."
    			'SendEmail(lv,msg_txt)
    				'goto Last
    				this.close()
    				MYL(msg_txt)
    				A5.Close()
    				End
    	End if
    Above is the code I use to register an external dll in my app. One difference is that in mine the namespace is explicitly declared/dimensioned.

    Also, check in your A5 program folder for a file "alpha5.exe.config" which is needed, as I understand it, for .Net versions earlier than 4. If that file is not present, shoot me a message and I'll email it to you. I haven't been able to upload files to the board in 6 months.
    Finian

    Comment


      #3
      Re: Problem: Register a DLL

      Finian,

      No I don't have the file "Alpha5.exe.config" - can you please email it to me - My email address is [email protected]

      Thanks for your help

      Comment


        #4
        Re: Problem: Register a DLL

        OK, I sent the file to that email address.
        Finian

        Comment


          #5
          Re: Problem: Register a DLL

          Originally posted by Finian Lennon View Post
          .....I haven't been able to upload files to the board in 6 months.
          And nobody has been able to fix this for you? Geeshhh...
          Robert T. ~ "I enjoy manipulating data... just not my data."
          It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
          RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

          Comment


            #6
            Re: Problem: Register a DLL

            The file didn't resolved the issues - I sent Alpha a support ticket hopefully I will be able to post the resolution

            Comment


              #7
              Re: Problem: Register a DLL

              Virginia:

              I got the zip and ran the script as follows, with all the variables declared as global.


              Code:
              	dim global Sv as DotNet::Services
              	dim global assy as DotNet::AssemblyReference
              	Dim global Namespace as C = "MyNamespace"
              	'assy.FileName="C:\Program Files (x86)\a5V11\PayGateWayNet.DLL" 'Hardcode the path while testing
              	assy.FileName=A5.Get_Path() + Chr(92) + "PayGateWayNet.DLL" 'Hardcode the path while testing
              	if .not. file.exists(assy.FileName)
              		ui_msg_box("can't find file",assy.FileName)
              		end
              	end if
              	sv.RegisterAssembly(Namespace,assy)
              	ui_msg_box("Call Result",sv.CallResult)
              Run this way (I left the dll in the app folder, but I don't think that is material) I got "success" from sv.CallResult.
              Finian

              Comment


                #8
                Re: Problem: Register a DLL

                Originally posted by SNusa View Post

                Originally posted by Finian Lennon View Post
                .....I haven't been able to upload files to the board in 6 months.
                And nobody has been able to fix this for you? Geeshhh...
                I reported this to Lenny. Not sure what he found if anything. I for one have never had an issue here, so he might not see it either?
                Peter
                AlphaBase Solutions, LLC

                [email protected]
                https://www.alphabasesolutions.com


                Comment


                  #9
                  Re: Problem: Register a DLL

                  Finian's solutions didn't solve my problem. I am able to get this to work on another programmers computer - but it still will not work on either of my two computers, nor will it work on my clients run time only computers. Obviously the code is correct, the dll works - but something is causing it to not work on my computers and my clients computer. We all have the same Alpha (clients have run times) , we all have same operating system (even the computer this does work on).
                  This dll is used by most of my competitors, and is in high demand from my current customer base. If it were just my machine having a problem I could live with that - but the fact that I can't install it on my customer's computers that is a big problem.

                  Does anyone have a clue, a direction, a setting I can look for that may solve this problem.

                  This is the message I get:
                  Error in DotNet::Services::RegisterAssembly - Exception loading assembly
                  Could not load file or assembly 'file:///C:\PayProPgm\PayGateWayNet.DLL' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

                  Comment


                    #10
                    Re: Problem: Register a DLL

                    Virginia, right click the DLL in Windows Explorer and view the properties to see if it is being blocked by Windows. This typically happens automatically if you've received the file from email or downloaded it from a web site.

                    Lenny Forziati
                    Vice President, Internet Products and Technical Services
                    Alpha Software Corporation

                    Comment


                      #11
                      Re: Problem: Register a DLL

                      Originally posted by Peter.Greulich View Post
                      I reported this to Lenny. Not sure what he found if anything. I for one have never had an issue here, so he might not see it either?
                      I have not been able to find any problems. I have opened a support request with the message board software vendor.

                      Lenny Forziati
                      Vice President, Internet Products and Technical Services
                      Alpha Software Corporation

                      Comment


                        #12
                        Re: Problem: Register a DLL

                        Lenny,

                        That was the issue the DLL was blocked. That solved the problem!
                        Thanks!!

                        Comment

                        Working...
                        X