vb.net Middle East soft Medicare interface call

Source: Internet
Author: User

Some time ago, a small project of hospital management system, request access to the city's health care interface, the city's health care interface is the East soft interface platform, for the dynamic library version, only provide a few configuration files and a few DLL dynamic library, the document is not detailed enough to write, and there are no language platform examples, only 1.1 points of groping, Although the project has been done for seven or eight years, but also for the first time to use vb.net, just do one side groping it!

Searched through the search engine, also did not find similar cases, only their own pondering, Neusoft provides the following document content:


1.1 Init initialization function
1.1.1 Function Description
Before the system starts, it calls the Init function to initialize, checks the configuration file, etc. to complete the dynamic library initialization preparation work.
1.1.2 Syntax Rules Syntax:
Externally available interfaces:
SiInterface.dll
Int INIT (char *poutputinfo)
Input parameters: None
Output parameters: Outputdata char*
Return value: Success 0 failed-1

1.1.3 parameter format: Outputdata char*
Prompt information, such as error, is the wrong prompt, his developer should be prompted for error messages.


1.2 Business_handle Business Functions
1.2.1 Syntax rules Syntax:
Externally available interfaces:
SiInterface.dll
int WINAPI business_handle (const char* Inputdata,
char* outputdata)
Input parameters: Inputdata
Output parameters: Outputdata char*
Return value: Success 0 failed-1
Input parameters are "^, $, |" Split string

The output is also "^" "@, ^, $, |" Split string


The function that invokes the input parameter is often used, but the output parameter is useless, and all the operations on the health care platform are done through the Business_handle function, which has been pondering for one weeks and finally figured out.

My workaround is as follows:

1. Import the dynamic library

<dllimport ("SiInterface.dll", entrypoint:= "init") > Public Shared Function INIT (ByVal outputinfo as String) as Integer

End Function
<dllimport ("SiInterface.dll", entrypoint:= "Business_handle") > Public Shared Function business_handle (ByVal Inputdata as String, <Out> ByVal Outputdata as StringBuilder) as Integer

End Function

2. Call the dynamic Library

Dim inputdata as String ' enter parameter
Dim Outputdata as New StringBuilder () ' Out parameter

Outputdata. Capacity = 1024 ' because the calling out parameter needs to allocate memory, now allocates memory space to store the parameter

Inputdata= "Enter argument string"

Business_handle (Inputdata, outputdata) ' Call function

When executed, Outputdata will have the information returned by the health care interface.

Which Dim outputdata as New StringBuilder () This sentence is the most important, I tried a lot of heavy methods, are not good use, only this sentence to use.

I hope to have some help to the yards of the farm counterparts.



This article is from the "Rain" blog, please be sure to keep this source http://yushihai.blog.51cto.com/979778/1569357

vb.net Middle East soft Medicare interface call

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.