2 Calls the method 3 Converts the binary data back into the data structure

2 calls the method 3 converts the binary data back

This preview shows page 207 - 210 out of 334 pages.

2 Calls the method. 3 Converts the binary data back into the data structure according to the rules defined in the Write BLOB Data method and the Clib Read From File method. It performs data conversion according to the current BigEndianMode setting. For more information, see “Write BLOB Data Method” on page 108 and “Clib Read From File Method” on page 243 . Example 1 The following example describes a proxy DLL that uses denormalized input values, creates the structure, and calls a method in the destination DLL: #include <windows.h> _declspec(dllexport) int __cdecl score ( double AGE, double AVGCHECKBALANCE, double AVGSAVINGSBALANCE, double CHURN_SCORE, double CONTACT_LENGTH, double HOMEOWNER, double *P_CHURN_SCORE, double *R_CHURN_SCORE, char _WARN_[5] ) { *P_CHURN_SCORE = AGE + AVGCHECKBALANCE + AVGSAVINGSBALANCE; *R_CHURN_SCORE = CHURN_SCORE + CONTACT_LENGTH + HOMEOWNER; strcpy(_WARN_, "SFD"); return(1); } Example 2 The following example calls a DLL. This code uses the buffer for pointers and characters: function TestDLLCall3() { var AGE = 10; var AVGCHECKBALANCE = 20; var AVGSAVINGSBALANCE = 30; var CHURN_SCORE = 40; var CONTACT_LENGTH = 50; var HOMEOWNER = 60; var P_CHURN_SCORE = Buffer(8); var R_CHURN_SCORE = Buffer(8); var _WARN_ = Buffer(5);
Image of page 207
Siebel eScript Language Reference Version 8.1, Rev. A Methods Reference Siebel Library Methods 208 SElib.dynamicLink("jddll.dll", "score", CDECL, FLOAT64, AGE, FLOAT64, AVGCHECKBALANCE, FLOAT64, AVGSAVINGSBALANCE, FLOAT64, CHURN_SCORE, FLOAT64, CONTACT_LENGTH, FLOAT64, HOMEOWNER, P_CHURN_SCORE, R_CHURN_SCORE, _WARN_); var r_churn_score = R_CHURN_SCORE.getValue(8, "float"); var p_churn_score = P_CHURN_SCORE.getValue(8, "float"); var nReturns = r_churn_score + p_churn_score; return(nReturns); } Other Examples The following example calls a DLL function in the default codepage: var sHello = "Hello"; Selib.dynamicLink("MyLib.dll", "MyFunc", CDECL, sHello); The following example calls a DLL function that passes Unicode strings: var sHello = "Hello"; Selib.dynamicLink("MyLib.dll", "MyFunc", CDECL, WCHAR, sHello); The following example calls a DLL function that passes Unicode and nonUnicode strings: var sHello = "Hello"; var sWorld = "world"; Selib.dynamicLink("MyLib.dll", "MyFunc", CDECL, WCHAR, sHello, sWorld); The following example calls an external application and passes arguments 0, 0, and 5 to it: SElib.dynamicLink("shell32", "ShellExecuteA", STDCALL, 0, "open", "c:\\Grabdata.exe", 0, 0, 5). Related Topics For more information, see “Clib Send Command Method” on page 294 .
Image of page 208
Methods Reference Siebel Library Methods Siebel eScript Language Reference Version 8.1, Rev. A 209 Siebel Library Get Pointer Address Method The Siebel Library Get Pointer Address method gets the address in memory of the first byte of data in a buffer variable. It returns the address of the pointer to the buffer variable. For more information, see “Buffer Methods” on page 110 . CAUTION: A pointer is valid only until a script modifies the variable that the bufferVar argument identifies or until the variable goes out of scope in a script. Placing data in the memory that this variable occupies after such a change is not recommended. Be careful not to place more data than this memory can hold.
Image of page 209
Image of page 210

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes