3b2 Tutorial Pdf
- Trevor Norton
- 2 years ago
- Views:
Transcription
1 LuaCOM User Manual (Version 1.3b2) Vinicius Almra Renato Cerqueira Fabio Mascarenhas 11th February 2005
2 Contents 1 Introduction Features Who Should Read What (or About the Manual) Tutorial Using The LuaCOM library Locating COM Objects Creating Objects Getting Help about an Object Methods and Properties Releasing Objects LuaCOM Elements LuaCOM API LuaCOM objects Object Disposal Automation binding Implementing dispinterfaces in Lua Using Methods and Properties Connection Points: handling events Parameter Passing Exception Handling Type Conversion Boolean values Pointers to IDispatch and LuaCOM objects Pointers to IUnknown Arrays and Tables CURRENCY type DATE type Variants Error Handling Other Objects The Enumerator Object The Connection Point Container Object The Typelib and Typeinfo Objects
3 4 Implementing COM objects and controls in Lua Introduction Is it really useful? Terminology Building a LuaCOM COM server Specify the component Objects to be exported Building the type library Registration Information Registering the Component Object Implementing and Exposing the Component Initialization and Termination Running the COM server Generating Events Full Example Building a Lua OLE control Release Information Limitations Known bugs Future Enhancements Important issues about LuaCOM Problems instantiating COM objects Releasing COM objects from memory Receiving events Extensible Interfaces Visual Basic c issue History Reference The C/C++ API The Lua Standard API Lua Exted API Enumerator Object Type Library Object Type Information Object Credits 63 2
4 Chapter 1 Introduction LuaCOM is an add-on library to the Lua language that allows Lua programs to use and implement objects that follow Microsoft s Component Object Model (COM) specification and use the Automation technology for property access and method calls. 1.1 Features Currently, the LuaCOM library supports the following features: dynamic instantiation of COM objects registered in the system registry, via the CreateObject method; dynamic access to running COM objects via GetObject; COM method calls as normal Lua function calls and property accesses as normal table field accesses; ability to read type libraries and to generate HTML documentation on-the-fly for COM objects; use of COM objects without type information; type conversion between OLE Automation types and Lua types; object disposal using Lua garbage collection mechanism; implementation of COM interfaces and objects using Lua tables; implementation of OLE controls using Lua tables (needs a Lua GUI toolkit that can create in-place windows, like IUP); use of COM connection point mechanism for bidirectional communication and event handling; fully compatible with Lua 5 and with Lua 4; log mechanism to ease the debugging of applications. 3
Lower level (Novice) users may find the tutorial information (Chapter 7). Before your 3B2 Computer can communicate with a remote machine. 3B2's macros provide a programming language that can be used to create sophisticated, flexible automated publishing solutions. They can be used as fast access codes to any of 3B2's functions. Every selection, keystroke, and even mouse movement generates internal macros. Subject index only applicable to the PDF version.
5 1.2 Who Should Read What (or About the Manual) This manual is mostly a reference manual. Here we document the behavior of LuaCOM in a variety of situations, some implementation decisions that affect the -user of the library and its limitations. When facing some strange behavior in an application built using LuaCOM, the first step is to read all the chapter 5, where the majority of possible problems are documented. There can be found references to other sections of the manual, where more detailed information is provided. Newbies For those who are newcomers, we provide a tutorial section (chapter 2) with a step-by-step guide to start using LuaCOM. More help and samples can be found in LuaCOM s home page. Notice that VBScript code can be easily converted to Lua with LuaCOM. This manual does not provide information for developers who need deeper technical information about LuaCOM or who are willing to modify it for some reason. For this kind of information, please contact the authors. Knowledge required This manual presumes some knowledge of COM and Automation. We don t int to explain in detail how these technologies work or how they can be used to solve particular problems. This information can be found easily in the web or in good books. Some information about samples The sample codes shown in this documentation are all for Lua 5, although most of them should also run in Lua 4. Anyway, Lua 4 specific samples can be found in the documentation for the previous version of LuaCOM. 4
6 Chapter 2 Tutorial 2.1 Using The LuaCOM library LuaCOM is an add-on to the Lua language. To be used, either the binary library of LuaCOM must be linked with the host program, just like the Lua library and other add-ons, or you should load a LuaCOMdynamic library through Lua 5 s require/loadlib mechanism. To use dynamic loading in Lua 4 you should implement a similar mechanism. There are different versions of the LuaCOM binary for the different versions of the Lua library, so pay attention to link the right one. If you are linking LuaCOMto your program, the next step is to modify the source code of the host program to call LuaCOM s and COM initialization and termination functions, which are part of the C/C++ API. To do so, include the LuaCOM s header luacom.h and call these functions in the proper order: LuaCOM must be initialize after COM and after Lua; it must be terminated before Lua; COM must be terminated AFTER Lua 1. Here is an example of a simple C host program program using LuaCOM. /* * Sample C program using luacom */ #include <stdio.h> #include <ole2.h> // needed for CoInitialize and CoUninitialize #include <lua.h> #include 'luacom.h' int main (int argc, char *argv[]) { /* COM initialization */ CoInitialize(NULL); /* library initialization */ lua_state *L = lua_open(); luacom_open(l); if(lua_dofile('luacom_sample.lua')!= 0) { puts('error running sample!'); exit(1); } 1 Notice that COM must be initialized in each thread that will use it. To use LuaCOM in this situation, it s not safe to share a single Lua state among several threads; one should create a new Lua state for each thread and then initialize LuaCOM with this state. 5
7 } luacom_close(l); lua_close(l); CoUninitialize(NULL); return 0; Notice that it s necessary to initialize COM before lua_open and to terminate it only after the last lua_close, otherwise fatal errors may occur. Using Lua 5 to dynamically load LuaCOM is simpler. Just call require('luacom') in your Lua script, and make sure the file luacom.lua is in your LUA_PATH environment variable, and the Lua and LuaCOM DLLs (lua-5.0.dll, lualib-5.0.dll and luacom-lua5-1.3b2.dll, respectively) are in your PATH. Then run your script with the Lua standalone interpreter. 2.2 Locating COM Objects The first step to use a COM object is to find it. COM objects are registered in the system registry and are associated with an unique Class Identifier, known as CLSID. A CLSID may also be associated with a string known as Programmatic Identifier or ProgID. This last one is the easiest way to reference a COM object. E.g., the ProgID for Microsoft c Word c is Word.Application. If one do not know in advance what is the CLSID or the ProgID of the object of interest, them it s possible to use tools like OleView to find the object, although the best place to find it is in the object s documentation. 2.3 Creating Objects With the ProgID or the CLSID of an object, it s now possible to create a new instance of it or to get a running instance. To do so, the easiest way is to use the method CreateObject of the Lua API: word = luacom.createobject('word.application') assert(word) word.visible = true If there is an already running instance of the object you want, GetObject must be used to use it. The following code illustrates this: -- If there is an instance of Word(r) running, -- it will it word = luacom.getobject('word.application') if word then word:quit() word = nil 2.4 Getting Help about an Object To use a COM object, the first thing one must know is its interface, that is, its set of methods and properties. This information normally is available in the documentation of the object, but sometimes one do not have access to this documentation. LuaCOM can offer some help if the object has 6
8 type information. If the object has an associated help file, LuaCOM can launch it using the method ShowHelp: word = luacom.createobject('word.application') assert(word) luacom.showhelp(word) If the object has an associated type library, LuaCOM can generate and display an HTML file describing it. This information can also be read using other type library browsers, as OleView. The method DumpTypeInfo can be used in console applications to list the methods and properties of the interface. It does not give much information, but can be helpful when playing with an object. 2.5 Methods and Properties After creating an object, the next step is to use it. This is primarily done through method calls and property accesses. To call a method of the object, do it as if the method was a function stored in a Lua table whose key is the method name: -- Here we call the method Show of the COM object myobj:show() -- A method with a return value result = myobj:checkstate() -- A method with parameters file = myobj:loadfile('test.xyz', 1) -- A method with output values x, y = myobj:updateposition(x, y) To read or write simple properties, one must simply use them as if they were normal table fields. -- Reading properties value1 = obj1.value value1 = obj2.value -- writing a property obj3.value = value1 + value2 Automation includes support to parametrized properties. These can be accessed (or written) using accessor functions. value = obj:getmatrixvalue(1,1) value = value*0,125 obj:setmatrixvalue(1, 1, value) 2.6 Releasing Objects Objects are automatically released using Lua s garbage collection mechanism, that is, when there are no references to them in Lua. However, some objects may demand an explicit termination method call, like Quit. 7
9 obj = luacom.createobject('myapp.myobj') -- Here we force an immediate release of the object obj = nil collectgarbage() Notice that if there is any references to the COM object alive in Lua then the application (or library) that implements it will not exit. 8
10 Chapter 3 LuaCOM Elements LuaCOM is composed by the following elements: LuaCOM objects, which make COM objects available in Lua; LuaCOM API, a set of functions used to do a variety of tasks (library initialization, object creation, implementation of Automation interfaces in Lua, manipulation of connection points etc.); Automation binding, which translates accesses on LuaCOM objects to COM interface calls and COM accesses on an interface implemented in Lua to Lua function calls or table accesses; LuaCOM type conversion rules, which govern the type conversion between Lua and Automation types; LuaCOM parameter passing rules, which describe how LuaCOM translate a Lua parameter list to a COM one and vice versa; other objects, like typelib, typeinfo, enumerator etc. 3.1 LuaCOM API The LuaCOM API is divided in two parts: the standard API and the exted API. The standard API comprises the core functionality needed to use COM objects. The exted API includes more advanced features to Lua API that simplify the development of applications using LuaCOM. This distinction has been made due to the possible unbounded growth of features, which could up cluttering the library and making it bigger and bigger and more and more difficult to use. For now, the exted API is entirely implemented in Lua 5 and can be easily removed without trouble. The standard API is further divided in two classes: the Lua API and the C/C++ API. The C/C++ API is used primarily for initialization of the library and for low-level construction of LuaCOM objects. It is declared in the header file luacom_h. The Lua API permits Lua programs to access all the functionality of LuaCOM. It is implemented as a set of functions inside a global table named luacom; hereafter these functions will be called LuaCOM methods. This table is created and populated when the C/C++ API function luacom open is called. Notice that the exted API lies in a different table, called luacome. Below there is summary of the LuaCOM API. Detailed information on these methods is available in chapter 6. 9
11 Method CreateObject NewObject NewControl GetObject ExposeObject RevokeObject RegisterObject UnRegisterObject Connect ImplInterface Standard Lua API Description Creates a LuaCOM object. Creates a LuaCOM object implemented in Lua. Creates a LuaCOM OLE control implemented in Lua. Creates a LuaCOM object associated with an instance of an already running COM object. Exposes a LuaCOM object or OLE control, so that other applications can get a reference to it. Undoes the operation of ExposeObject. Fills in the registry entries necessary for exposing a COM object or OLE control. Removes the registry entries necessary for exposing a COM object or OLE control. Creates a connection point between an object and a Lua table. Implements an IDispatch interface using a Lua table. ImplInterfaceFromTypelib addconnection releaseconnection ismember ProgIDfromCLSID CLSIDfromProgID GetIUnknown DumpTypeInfo Implements an IDispatch interface described in a Type Library using a Lua table. Connects two LuaCOM objects. Disconnects a LuaCOM object from its connection point. Checks whether a name correspond to a method or a property of an LuaCOM object. Gets the ProgID associated with a CLSID. Gets the CLSID associated with a ProgID. Returns an IUnknown interface to a LuaCOM object as a full userdata. 10 Dumps to the console the type information of the specified LuaCOM object. This method should be used only for debugging purposes.
12 Standard Lua API (continued) Method Description GetCurrentDirectory Returns the current directory. CreateLuaCOM ImportIUnknown DetectAutomation Transforms an IUnknown full userdata into a LuaCOM object. Converts a light userdata (pointer) to an IUnknown full userdata. Used to implement COM servers. Looks in the command-line for /Register or /UnRegister /Automation (not case-sensitive) and calls user-defined functions to register, unregister, or expose objects, entering a message loop in the latter case. If there is no command-line then assume it is being run in-process, calls the expose function and returns. 11
13 Method CreateLocalObject Exted Lua API Description Creates a LuaCOM object as an out-of-process server. CreateInprocObject ExportConstants DumpTypeLib GetType ViewTypeLib pairs FillTypeLib FillTypeInfo Creates a LuaCOM object as an in-process server. Exports all the constants of a type library (standalone or bound to a LuaCOM object) to the global environment (or optionally to a table). Creates an HTML file describing a type library. Returns a string describing the type of object, in the case its an object belonging to the LuaCOM library. Runs DumpTypeLib and shows the created file using Internet Explorer c. Does the same as pairs for COM Enumerators. Creates a table describing a type library. Creates a table describing a type info. 12
14 Standard C/C++ API Function Description luacom_open Initializes the LuaCOM library in a Lua state. It must be called before any use of LuaCOM features. luacom_close luacom_detectautomation luacom_idispatch2luacom LuaCOM s termination function. This function is a helper to create COM servers. It looks in the command line for the switches /Automation and /Register and call some user-defined Lua functions accordingly. Takes an IDispatch interface and creates a LuaCOM object to expose it, pushing the object on the Lua stack. 3.2 LuaCOM objects LuaCOM deals with LuaCOM objects, which are no more than a Lua table with the LuaCOM metatable and a reference to the LuaCOM C++ object; this one is, in turn, a proxy for the COM object: it holds an IDispatch pointer to the object and translates Lua accesses to Automation calls and property accesses. Here is a sample where a LuaCOM object is used: -- Instantiate a Microsoft(R) Calar Object calar = luacom.createobject('mscal.calar') -- Error check if calar nil then print('error creating object') exit(1) -- Method call calar:aboutbox() -- Property Get current_day = calar.day -- Property Put calar.month = calar.month + 1 print(current_day) print(calar.month) Every time LuaCOM needs to convert an IDispatch pointer to Lua it creates a LuaCOM object. There are two situations where this happens: when calling LuaCOM API functions that return COM objects (CreateObject, GetObject, NewObject, Connect etc.) and 13
15 when receiving return values from COM, where some of the values are IDispatch pointers. Follows a sample of these situations: -- First, we get a luacom object using LuaCOM API excel = luacom.createobject('excel.application') assert(luacome.gettype(excel) 'LuaCOM') -- now we get one from a method call sheets = excel.sheets assert(luacome.gettype(sheets) 'LuaCOM') A LuaCOM object may be passed as a parameter to method calls on other LuaCOM objects, if these methods expect an argument of type dispinterface. Here is a sample to illustrate this situation: -- Gets a running instance of Excel excel = luacom.getobject('excel.application') -- Gets the set of worksheets sheets = excel.worksheets -- gets the first two sheets sheet1 = sheets:item(1) sheet2 = sheets:item(2) -- Exchange them (here we pass the second sheet as a parameter -- to a method) sheet1:move(nil, sheet2) There are two kinds of LuaCOM objects: typed and generic ones. The typed ones are those whose COM object has type information. The generic ones are those whose COM object does not supply any type information. This distinction is important in some situations Object Disposal LuaCOM objects are released through Lua s garbage collection mechanism, so there isn t any explicit API method to destroy them. Caution LuaCOM only tracks references to COM objects. It does not work with the concepts of application, component, process etc. It does not know even which objects are part of the same component or application. This has some consequences on the object disposal: a component may only consider as finished its relationship with LuaCOM when all references to its objects are released, not only the one created with CreateObject; some components have a Quit method. This may close the component s interface, but it could remain running if there are any references to it. Nevertheless, these references cannot be reliably used after the Quit method has been called. To release the component, one must assign nil to all references to the component (and its sub-objects) and then call collectgarbage. 14
16 3.3 Automation binding The Automation binding is responsible for translating the table accesses to the LuaCOM object into COM interface calls. Besides that, it also provides a mechanism for implementing dispinterfaces using ordinary Lua tables Implementing dispinterfaces in Lua The Automation binding has a C++ class called tluadispatch that implements a generic IDispatch interface. The implementation of this class translates the method calls and property accesses done on the objects of this class to Lua calls and table accesses. So, one may implement a dispinterface entirely in Lua, provided it has a type library describing it. This type library may be a stand-alone one (referenced by its location on the file system) or may be associated with some registered component. In this case, it may be referenced by the ProgID of the component. The C++ objects of this class can be used in any place where an IDispatch or IUnknown interface is expected. LuaCOM takes care of these conversion. Follows a sample implementation of a dispinterface in Lua. -- Creates and fills the Lua table that will implement the -- COM interface events_table = {} function events_table:afterupdate() print('afterupdate called!') -- Here we implement the interface DCalarEvents, which is part -- of the Microsoft(R) Calar object, whose ProgID is MSCAL.Calar events_obj = luacom.implinterface( events_table, 'MSCAL.Calar', 'DCalarEvents') -- Checks for errors -- if events_obj nil then print('implementation failed') exit(1) -- Tests the interface: this must generate a call to the events:afterupdate -- defined above -- events_obj:afterupdate() If the interface to be implemented is described in a stand-alone type library, the method ImplInterfaceFromTy must be used instead: -- Creates and fills the Lua table that will implement the -- Automation interface hello_table = {} function hello:hello() 15
17 print('hello World!') -- Here we implement the interface IHello -- hello_obj = luacom.implinterfacefromtypelib('hello.tlb','ihello') -- Checks for errors -- if hello_obj nil then print('implementation failed') os.exit(1) -- Tests the interface -- hello_obj:hello() Both methods return a LuaCOM object, whose corresponding IDispatch interface is implemented by the supplied table. This LuaCOM object can be passed as an argument to COM methods who expect a dispinterface or to LuaCOM API methods (like addconnection). One can also use the NewObject method, which is best suited to the situation where one needs to create a complete component in Lua and wants to export it, so that it can be accessed through COM by any running application Using Methods and Properties The dispinterfaces have two types of members: properties and methods. LuaCOM deals with both. Method accesses are done in the same way as calling Lua functions stored in a table and having a self parameter: obj = luacom.createobject('test.test') if obj nil then exit(1) -- method call a = obj:teste(1,2) -- another one obj:teste2(a+1) It s important to notice the need of using the colon : for method calls. Although LuaCOM does not use the self parameter that Lua passes in this case, its presence is assumed, that is, LuaCOM always skips the first parameter in the case of method calls; forgetting it may cause nasty bugs. Notice that this rule doesn t apply when using the default method of a LuaCOM object stored in a table or in a property of another LuaCOM object (see section below). Accessing properties is much like the same of accessing fields in Lua tables: obj = luacom.createobject('test.test') if obj nil then exit(1) 16
18 -- property access a = obj.testdata -- property setting obj.testdata = a + 1 Properties may also be accessed as methods. This is mandatory when dealing with parameterized properties, that it, ones that accept (or demand) parameters. A common example of this situation is the Item property of collections. -- property access a = obj:testdata() -- Parametrized property access b = obj:testinfo(2) -- Accessing collections c = obj.files:item(2) Notice that the colon : must also be used in this situation. When accessing properties with method calls, LuaCOM always translates the method call to a read access (property get). To set the value of a property using a method call, it s necessary app the prefix set 1 to the property name and the new value must be supplied as the last argument. -- property access a = obj:testdata() -- Setting the property b = obj:settestinfo(2) -- Setting a parametrized property c = obj.files:setitem(2, 'test.txt') The prefix get may also be used, to clarify the code, although it s not necessary, as the default behavior is to make a read access. -- property access a = obj:gettestdata() b = obj:gettestinfo(2) c = obj.files:getitem(2) Extensible interfaces LuaCOM allows the use of properties as simple Lua fields just for objects that have type information. Nevertheless, some objects that have type information describing their interfaces implement properties that are not described in the type library: these objects implement extensible interfaces. Those properties can only be used with accessor functions, as shown in section An example of such behaviour is found in WMI objects (Windows Management Instrumentation). 1 In a future version it might be allowed to change the prefix. 17
19 Default methods A dispinterface can have a default method or property, that is, one that is called when the client does not specify the method name. LuaCOM calls the default method when the object itself is used as a function. excel = luacom.createobject('excel.application') excel.visible = true excel.workbooks:add() -- Here we call the default method -- notice we DID NOT use the colon, as -- the object used is Sheets, not excel sheet = excel.sheets(1) print(sheet.name) -- Here we also call the default method -- We must supply the self parameter sheets = excel.sheets sheet2 = sheets(2) print(sheet2.name) -- Setting values excel.sheets(1).name = 'MySheet1' excel:quit() This can be very useful when dealing with collections, as commonly they have a default Item property. WARNING: one must be careful not to put the colon when using default methods of LuaCOM objects contained in table or in other LuaCOM objects (see the sample above). Generic LuaCOM objects To read or write properties in generic LuaCOM objects, it s necessary access them as method calls with the right prefix (get/set). The simpler semantic of table field access does not work here. obj_typ = luacom.createobject('some.typedobject') obj_untyp = luacom.createobject('untyped.object') -- property read (get) a = obj_typ.value b = obj_untyp:getvalue() -- property write (set) obj.typ = a + 1 obj_untyp:setvalue(b + 1) Property Access in Lua When implementing a COM interface in Lua, LuaCOM also supports the concept of property and of indexed properties. LuaCOM translate property reads and writes to table field accesses: interface = {} 18
20 interface.test = 1 interface.testindex = {2,3} obj = luacom.implinterface(interface, 'TEST.Test', 'ITest') -- must print '1' print(obj.test) -- must print nil (if there is no member named Test2) print(obj.test2) -- this writes the filed Test obj.test = 1 -- Indexed property read. Must return 3 (remember that -- indexed tables start at 1 in Lua) i = obj:testindex(2) -- Sets the indexed field obj:settestindex(2,4) -- Now must return 4 i = obj:testindex(2) Connection Points: handling events The connection points are part of a standard ActiveX mechanism whose primary objective is to allow the ActiveX object to notify its owner of any kind of events. The connection point works as an event sink, where events and notifications go through. To establish a connection using LuaCOM, the owner of the ActiveX object must create a table to implement the connection interface, whose description is provided by the ActiveX object (this interface is called a source interface) and then call the API method Connect, passing as arguments the LuaCOM object for the ActiveX object and the implementation table. Doing this, LuaCOM will automatically find the default source interface, create a LuaCOM object implemented by the supplied table and then connect this object to the ActiveX object. Here follows a sample: -- Creates the COM object -- calar = luacom.createobject('mscal.calar') if calar nil then os.exit(1) -- Creates implementation table -- calar_events = {} function calar_events:afterupdate() print('calar updated!') -- Connects object and table -- res, cookie = luacom.connect(calar, calar_events) if res nil then exit(1) 19
21 -- This should trigger the AfterUpdate event -- calar:nextmonth() The cookie returned by Connect identifies this connection, and can later be used to release the Connection. A COM object can have several event sinks connected to it simultaneously. It s also possible to separately create a LuaCOM object implementing the connection point source interface and then connect it to the object using addconnection. -- Instances the COM object -- calar = luacom.createobject('mscal.calar') if calar nil then print('error instantiating calar') os.exit(1) -- Creates implementation table -- calar_events = {} function calar_events:afterupdate() print('calar updated!') -- Creates LuaCOM object implemented by calar_events -- event_handler = luacom.implinterface(calar_events, 'MSCAL.Calar', 'DCalarEvents') if event_handler nil then print('error implementing DCalarEvents') exit(1) -- Connects both objects -- cookie = luacom.addconnection(calar, event_handler) -- This should trigger the AfterUpdate event -- calar:nextmonth() -- This disconnects the connection point established -- luacom.releaseconnection(calar, event_handler, cookie) -- This should NOT trigger the AfterUpdate event -- calar:nextmonth() Notice that addconnection also returns a cookie. A call to releaseconnection needs both the event sink and the cookie to release the connection. The old (pre-1.3) syntax of releaseconnection (ommiting the event sink and cookie) still works, but will only release the last connection made (but there will not be leaks, all connections are released when the object is garbage-collected). 20
22 Message loop To receive events, it is necessary to have a message loop in the thread that owns the object that is receiving the events. All events are dispatched through a Windows message queue created during COM initialization. Without a message loop, the event objects implemented by LuaCOM, will never receive method calls from the COM objects they are registered with. Out-of-process COM servers implemented with LuaCOM also need a message loop to be able to service method calls (one is provided by calling luacom.detectautomation) Parameter Passing LuaCOM has some policies concerning parameter passing. They specify how LuaCOM will translate COM parameter lists to Lua and vice-versa. There are two different situations to which these policies apply: calling a method of a COM object from Lua and calling a Lua function from COM. The main question here is how to deal with the different types of parameters supported by COM ( in parameters, out parameters, in-out parameters, optional parameters and defaultvalue parameters). There is also a special policy concerning generic LuaCOM objects. Calling COM from Lua This situation happens when accessing a property or calling a method of a COM object through the LuaCOM object. Here follows a sample: word = luacom.getobject('word.application') -- Here we are calling the 'Move' method of the Application object of -- a running instance of Microsoft(R) Word(R) word:move(100,100) In this situation, there are two steps in the parameter passing process: 1. convert Lua parameters to COM (this will be called the lua2com situation); 2. convert COM s return value and output values back to Lua (this will be called the com2lua situation). lua2com situation The translation is done based on the type information of the method (or property); it s done following the order the parameters appear in the type information of the method. The Lua parameters are used in the same order. For each parameter there are three possibilities: The parameter is an in parameter LuaCOM gets the first Lua parameter not yet converted and converts it to COM using LuaCOM type conversion engine. The parameter is an out parameter LuaCOM ignores this parameter, as it will only be filled by the called method. That is, the out parameters SHOULD NOT appear in the Lua parameter list. The parameter is an in-out parameter LuaCOM does the same as for in parameters. When the caller of the method wants to omit a parameter, it must pass the nil value; LuaCOM then proceeds accordingly, informing the called method about the omission of the parameter. If the parameter has a default value, it is used instead. Notice that LuaCOM does not complain when one omits non-optional parameters. In fact, LuaCOM ignores the fact that a parameter is or isn t optional. It leaves the responsibility for checking this to the implementation of the called method. 21
23 com2lua situation When the called method finishes, LuaCOM translates the return value and the output values (that is, the values of the out and in-out parameters) to Lua return values. That is, the method return value is returned to the Lua code as the first return value; the output values are returned in the order they appear in the parameter list (notice that here we use the Lua feature of multiple return values). If the method does not have return values, that is, is a void method, the return values will be the output values. If there are no output values either, then there will be no return values. The called method can omit the return value or the output values; LuaCOM them will return nil for each omitted value. To illustrate these concepts, here follows a sample of these situations. First, we show an excerpt of an ODL file describing a method of a COM object: HRESULT TestShort( [in] short p1, // an 'in' parameter [out] short* p2, // an 'out' parameter [in,out] short* p3, // an 'in-out' parameter [out,retval] short* retval); // the return value Now follows a sample of what happens when calling the method: -- assume that 'com' is a LuaCOM object -- Here we set p1 = 1, p3 = 2 and leave p2 uninitialized -- When the method returns, r1 = retval and r2 = p2 and r3 = p3 r1, r2, r3 = com:testshort(1,2) -- WRONG! The are only two in/in-out parameters! Out parameters -- are ignored in the lua2com parameter translation r1, r2, r3 = com:testshort(1,2,3) -- WRONG! -- Here p1 = 1, p2 is uninitialized and p3 is omitted. r1, r2, r3 = com:testshort(1) -- Here we ignore the output value p3 r1,r2 = com:testshort(1) -- Here we ignore all output values (including the return value) com:testshort(1,2) Generic LuaCOM objects When dealing with generic LuaCOM objects, the binding adopts a different policy: all Lua parameters are converted to COM ones as in-out parameters. LuaCOM assumes that these methods always return a value; if the called method does not return anything, LuaCOM pushes a nil value 2. As all parameters are set as in-out, all of them will be returned back to Lua, modified or not by the called method. Calling Lua from COM This situation happens when one implements a COM dispinterface in Lua. The ActiveX binding has to translate the COM method calls to Lua function calls. The policy here concerning parameter list translation is the same as the one above, just exchanging Lua for COM and vice-versa. That 2 This feature allows a clear distinction between the return value and the in-out parameters, as all parameters will up being returned. 22
24 is, all in an in-out COM parameters are translated to parameters to the Lua function call (the output parameters are ignored). When the call finishes, the first return value is translated as the return value of the COM method and the other return values are translated as the in-out and out values, following the order they appear in the method s type information. Continuing the previous example, here we show the implementation of a method callable from COM: implementation = {} -- This method receives TWO in/in-out parameters function implementation:testshort(p1, p2) -- the first one is the retval, the second the first out param -- the third the second out param (in fact, an in-out param) return p1+p2, p1-p2, p1*p2 -- Implements an interface obj = luacom.implinterface(implementation, 'TEST.Test', ITest) -- calls the function implementation:testshort via COM r1, r2, r3 = obj:testshort(1,2) Exception Handling When a run time error occurr when using LuaCOM s methods or objects, there are two possible actions LuaCOM can take: to signal the error using lua_error; ignore the error, just doing nothing or returning some kind of error value. The run time errors can be divided into three types: errors inside API calls, like CreateObject; errors when using LuaCOM objects (COM method calls); errors inside COM objects implemented in Lua. The third type of error is always translated into a COM exception returned to the server. To ease debugging, these errors are also logged (if the logging facility has been activated), as the server can silenty ignore these exceptions, specially in events. If the LuaCOM library is compiled with VERBOSE defined, then a lot of informative messages are logged and all errors are displayed within a dialog box. This helps debug errors inside events on the fly, as these errors are commonly ignored by the server. Notice that this options slows down LuaCOM and can generate very big log files. The behaviour of LuaCOM for the other two types can be customized. There is a table called config inside the LuaCOM table. This table holds three fields related to error handling: abort on API error if false, LuaCOM silently fails on errors inside API calls. This is NOT true for errors caused by supplying bad parameters: these always generate calls to lua_error. The default value for this field is false. 23
25 abort on error if false, errors inside method calls and property accesses are also ignored, possibly return nil where a return value is expected. The default value for this field is true. last error every time a run time error occurr LuaCOM sets this field with the text describing the error. This field can be used to check if some operation failed; just remember to set it to nil before the operation of interest. Sample -- to make all LuaCOM errors runtime errors luacom.config.abort_on_error = true luacom.config.abort_on_api_error = true -- to silently ignore all errors luacom.config.abort_on_error = false luacom.config.abort_on_api_error = false -- catching an ignored error luacom.config.last_error = nil obj:runmethod(x,y) if luacom.config.last_error then print('error!') exit(1) All errors are also logged. Notice that some of the logged exceptions are not really errors: they are side-effects of the extensive use of exception handling inside LuaCOM code. 3.4 Type Conversion LuaCOM is responsible for converting values from COM to Lua and vice versa. Most of the types can be mapped from COM to Lua and vice versa without trouble. But there are some types for which the mapping is not obvious. LuaCOM then uses some predefined rules to do the type conversion. These rules must be known to avoid misinterpretation of the conversion results and to avoid errors Boolean values Lua 5 LuaCOM uses the boolean values true and false, but does not works with the older convention (nil and non-nil; see paragraph below). Lua 4 This version of Lua uses the nil value as false and non-nil values as true. As LuaCOM gives a special meaning for nil values in the parameter list, it can t use Lua convention for true and false values; instead, LuaCOM uses the C convention: the true value is a number different from zero and the false value is the number zero. Here follows a sample: -- This function alters the state of the of the window. -- state is a Lua boolean value -- window is a LuaCOM object function showwindow(window, state) if state then 24
26 window.visible = 1 -- this has the same result windows.visible = -10 else window.visible = 0 -- Shows window showwindow(window, 1) -- Hides window showwindow(window, nil) Pointers to IDispatch and LuaCOM objects A pointer to IDispatch is converted to a LuaCOMobject whose implementation is provided by this pointer. If the object is implemented by local Lua table, then the pointer is converted to this table. A LuaCOMobject is converted to COM simply passing its interface implementation to COM Pointers to IUnknown LuaCOM just allows passing and receiving IUnknown pointers; it does not operate on them. They are converted from/to userdatas with a specific metatable Arrays and Tables If the table does not have a tocom tag method (for Lua 4) or tocom metamethod (for Lua 5), LuaCOM first checks if the table can be describing a variant. A table is a variant if it has a Type field. This field must have a string that tells how the Value field of the table must be converted. Possible values for Type are string, bool, error, null, currency, decimal, double, float, int8, uint8, int4, uint4, int2, uint2, int1, verb+uint1+, int, and uint. Each corresponds to a variant type. If the table is not describing a variant, then it may be describing a date. A table is a date if it has one of those fields: Day, DayOfWeek, Month, Year, Hour, Minute, Second, Milliseconds. LuaCOM initializes the date with the fields that are present; the others are kept at their default values. If the table is not a date, LuaCOM converts Lua tables to SAFEARRAY s and vice-versa. To be converted, Lua tables must be array-like, that is, all of its elements must be or scalars or tables of the same length. These tables must also be array-like. Here are some samples of how is this conversion done: Lua table Safe Array table = {'name', 'phone'} [ name phone ] table = {{1,2},{4,9}} [ ] If the table has the conversion tag/metamethod, LuaCOM uses it to guide the conversion. If the tag/metamethod is a method, LuaCOM calls it, passing the table and the COM type. The method 25
27 should return a COM object that LuaCOM will pass on. If the tag/metamethod is a table, LuaCOM will look for a typelib field, an interfacefield, and a coclass field, and pass those as arguments to the ImplInterfaceFromTypelib API call. If the table does not have a typelib field, LuaCOM will look for a progid field and an interface field, and pass those to the ImplInterface API call. Either way, LuaCOM will pass the returned object to COM CURRENCY type The CURRENCY values are converted to Lua as numbers. When converting a value to COM where a CURRENCY is expected, LuaCOM accepts both numbers and strings formatted using the current locale for currency values. Notice that this is highly depent on the configuration and LuaCOM just uses the VARIANT conversion functions DATE type When converting from COM to Lua, the default behavior is to transform DATE values to strings formatted according to the current locale. The converse is true: LuaCOM converts strings formatted according to the current locale to DATE values. The script can change the conversion from strings to tables by setting the DateFormat field of the luacom table (the LuaCOM namespace) to the string 'table'. The table will have Day, DayOfWeek, Month, Year, Hour, Minute, Second, and Milliseconds fields. To return the conversion to strings, set the DateFormat field to 'string'. Be careful with this feature, as it may break compatibility with other scripts Variants When converting from COM to Lua, the default behavior is to transform variant values to the closest Lua type. The script can change the conversion from Lua types to a table describing the variant, by setting the TableVariants field of the luacom table(the LuaCOM namespace) to true. The tables will have a Type field telling the original type of the variant, and a Value field containing the conversion to the closest Lua type. Be careful with this feature, as it may break compatibility with other scripts Error Handling When LuaCOM cannot convert a value from or to COM it issues an exception, that may be translated to a lua_error or to a COM exception, deping on who is the one being called. 3.5 Other Objects LuaCOM deals with other objects besides COM Automation ones. Here we describe them briefly The Enumerator Object This object is a proxy for a COM object that implements the IEnumVARIANT interface. It translates the calls made to fields of the table to method calls using that interface. Enumerators arise often when dealing with collections. To obtain an enumerator for a collection, use the Lua API method GetEnumerator. Example: 26
28 -- -- Sample use of enumerators Gets an instance word = luacom.getobject('word.application') -- Gets an enumerator for the Documents collection docs_enum = luacom.getenumerator(word.documents) -- Prints the names of all open documents doc = docs_enum:next() while doc do print(doc.name) doc = docs_enum:next() The Exted Lua API method pairs allows the traversal of the enumeration using Lua s for statement. The sample above can be rewritten this way: Sample use of enumerators Gets an instance word = luacom.getobject('word.application') -- Prints the names of all open documents for index, doc in luacome.pairs(word.documents) do print(doc.name) The Connection Point Container Object This object allows a COM object implemented using LuaCOM to s events to its client. It s used primarily when implementing COM object in Lua, so see chapter 4 for more information The Typelib and Typeinfo Objects These objects allow the navigation through the type descriptions of a LuaCOM object or of a type library. They are proxies for the interfaces ITypeLib and ITypeInfo, although not all methods are available. For more information, see sections 6.5 and
29 Chapter 4 Implementing COM objects and controls in Lua 4.1 Introduction With LuaCOM it is possible to implement full-fledged COM objects and OLE controls using Lua. Here we understand a COM object as a composite of these parts: a server, which implements one or more COM objects; registry information, which associates a CLSID (Class ID) to a triple server type library default interface; a ProgID (Programmatic Identifier) which is a name associated to a CLSID; a type library containing a CoClass element. The registry information maps a ProgID to a CLSID, which is, in turn, mapped to a server. The type information describes the component, that is, which interfaces it exposes and what is the default interface. LuaCOM simplifies these tasks providing some helper functions to deal with registration and instantiation of COM servers. LuaCOM suports both local (EXE) and in-process (DLL) servers. LuaCOM also provides helper functions to register and instantiate OLE controls (with their user interface embedded in the hosting application). This kind of object needs an in-process server, and a supported Lua GUI toolkit (IUP, for now). 4.2 Is it really useful? Some might argue that it would be better to implement COM object in languages like C++ or Visual Basic c. That s true in many situations, and false in several others. First, dealing with COM is not easy and LuaCOM hides most its complexities; besides that, there is another compelling reason for using LuaCOM at least in some situations: the semantics of Lua tables and the way LuaCOM is implemented allows one to do some neat things: to expose as a COM object any object that can be accessed via Lua through a table. These might be CORBA objects, C++ objects, C structures, Lua code etc. Using this feature, a legacy application or library may be upgraded to COM world with little extra work; 28
30 to use COM objects anywhere a Lua table is expected. For example, a COM object might be exported as a CORBA object, accessible through a network; to add and to redefine methods of an instance of a COM object. This might be very useful in the preceding situations: an object of interest might be incremented and them exported to another client. Of course all this flexibility comes at some cost, primarily performance. Anyway, deping on the application, the performance drawback might be negligible. LuaCOM does not solve all problems: there is still the need of a type library, which must be build using third party tools. 4.3 Terminology To avoid misunderstandings, here we ll supply the meaning we give to some terms used in this chapter. We don t provide formal definitions: we just want to ease the understanding of some concepts. To better understand these concepts, see COM s documentation. Component a piece of software with some functionality that can be used by other components. It s composed by a set of objects that implement this functionality. Component Object an object through which all the functionality of a component can be accessed, including its other objects. This object may have many interfaces. Application Object A component object with a interface that comprises all the top-level functionality of a component; the client does not need to use other interfaces of the component object. This concept simplifies the understanding of a component, as it puts all its functionalities in an hierarchical manner (an application object together with its sub-objects, which can only be accessed through methods and properties of the application object). COM server Some piece of code that implements one or more component objects. A COM server must tell the other applications and components which component objects it makes available. It does so exposing them. OLE control An object that has an user interface, and can be embedded inside other applications that have OLE containers (usually C++ or VB applications). CoClass A type library describing a component should have a CoClass entry, specifying some information about the component: a name, differentiating one CoClass from others in the same type library; its CLSID, the unique identifier that distinguishes this component from all others; the interfaces of the component object, telling which one is the default. In a typical situation, only one interface will be supplied; thus the component object could be called an Application object for that component; the source interface, that is, the interface the component uses to s events to the client. This interface is not implemented by the component: it just uses objects that implement this interface. Lua Application Object It s the Lua table used to implement the Application Object. 29
Inteset Secure Lockdown ver. 2.0
Inteset Secure Lockdown ver. 2.0 for Windows XP, 7, 8, 10 Administrator Guide Table of Contents Administrative Tools and Procedures.. 3 Automatic Password Generation.. 3 Application Installation Guard
More informationLehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Middleware. Chapter 8: Middleware
Middleware 1 Middleware Lehrstuhl für Informatik 4 Middleware: Realisation of distributed accesses by suitable software infrastructure Hiding the complexity of the distributed system from the programmer
More informationPL/SQL Overview. Basic Structure and Syntax of PL/SQL
PL/SQL Overview PL/SQL is Procedural Language extension to SQL. It is loosely based on Ada (a variant of Pascal developed for the US Dept of Defense). PL/SQL was first released in ١٩٩٢ as an optional extension
More informationCA Data Protection. Content Provider Development Guide. Release 15.0
CA Data Protection Content Provider Development Guide Release 15.0 This Documentation, which includes embedded help systems and electronically distributed materials (hereinafter referred to as the Documentation
More informationCourse 10550A: Programming in Visual Basic with Microsoft Visual Studio 2010 OVERVIEW
Course 10550A: Programming in Visual Basic with Microsoft Visual Studio 2010 OVERVIEW About this Course This course teaches you Visual Basic language syntax, program structure, and implementation by using
More informationHypercosm. Studio. www.hypercosm.com
Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks
More informationStorage Classes CS 110B - Rule Storage Classes Page 18-1 handoutsstorclas
CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage
More informationCOM+ OVERVIEW OF MICROSOFTS COM, DCOM AND COM+ COMPONENT TECHNOLOGIES DCOM - COM+ Peter R. Egli INDIGOO.COM. indigoo.com. 1/20 Rev. 1.
COM, DCOM - COM+ DCOM, COM+ OVERVIEW OF MICROSOFTS COM, DCOM AND COM+ COMPONENT TECHNOLOGIES Peter R. Egli INDIGOO.COM 1/20 Contents 1. Evolution of COM 2. COM, DCOM, ActiveX, OLE, COM+ 3. Structure of
More informationCRM Setup Factory Installer V 3.0 Developers Guide
CRM Setup Factory Installer V 3.0 Developers Guide Who Should Read This Guide This guide is for ACCPAC CRM solution providers and developers. We assume that you have experience using: Microsoft Visual
More informationXcode Project Management Guide. (Legacy)
Xcode Project Management Guide (Legacy) Contents Introduction 10 Organization of This Document 10 See Also 11 Part I: Project Organization 12 Overview of an Xcode Project 13 Components of an Xcode Project
More informationC Primer. Fall Introduction C vs. Java.. 1
CS 33 Intro Computer Systems Doeppner C Primer Fall 2016 Contents 1 Introduction 1 1.1 C vs. Java..................... 1 2 Functions 1 2.1 The main() Function..................
More information2. Names, Scopes, and Bindings
2. Names, Scopes, and Bindings Binding, Lifetime, Static Scope, Encapsulation and Modules, Dynamic Scope Copyright 2010 by John S. Mallozzi Names Variables Bindings Binding time Language design issues
More informationMS Active Sync: Sync with External Memory Files
Mindfire Solutions - 1 - MS Active Sync: Sync with External Memory Files Author: Rahul Gaur Mindfire Solutions, Mindfire Solutions - 2 - Table of Contents Overview 3 Target Audience 3 Conventions..3 1.
More informationThe Basics of C Programming. Marshall Brain
The Basics of C Programming Marshall Brain Last updated: October 30, 2013 Contents 1 C programming 1 What is C?................. 2 The simplest C program, I............ 2 Spacing
More informationIntroduction CORBA Distributed COM. Sections 9.1 & 9.2. Corba & DCOM. John P. Daigle. Department of Computer Science Georgia State University
Sections 9.1 & 9.2 Corba & DCOM John P. Daigle Department of Computer Science Georgia State University 05.16.06 Outline 1 Introduction 2 CORBA Overview Communication Processes Naming Other Design Concerns
More informationSources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
More informationThe Microsoft Way: COM, OLE/ActiveX, COM+ and.net CLR. Chapter 15
The Microsoft Way: COM, OLE/ActiveX, COM+ and.net CLR Chapter 15 Microsoft is continually reengineering its existing application and platform base. Started with VBX, continued with OLE, ODBC, ActiveX,
More informationWhat is COM/DCOM. Distributed Object Systems 4 COM/DCOM. COM vs Corba 1. COM vs. Corba 2. Multiple inheritance vs multiple interfaces
Distributed Object Systems 4 COM/DCOM Piet van Oostrum Sept 18, 2008 What is COM/DCOM Component Object Model Components (distributed objects) à la Microsoft Mainly on Windows platforms Is used in large
More informationJava 7 Recipes. Freddy Guime. vk» (,['«** g!p#« Carl Dea. Josh Juneau. John O'Conner
1 vk» Java 7 Recipes (,['«** - < g!p#«josh Juneau Carl Dea Freddy Guime John O'Conner Contents J Contents at a Glance About the Authors About the Technical Reviewers Acknowledgments Introduction iv xvi
More informationLazy OpenCV installation and use with Visual Studio
Lazy OpenCV installation and use with Visual Studio Overview This tutorial will walk you through: How to install OpenCV on Windows, both: The pre-built version (useful if you won t be modifying the OpenCV
More informationGUI Interface for Project54 Applications Using XML Defined GUI Screens W. Thomas Miller, III
Technical Report ECE.P54.2007.2 January 16, 2007 GUI Interface for Project54 Applications Using XML Defined GUI Screens W. Thomas Miller, III This document describes the software interface for applications
More informationCORBA Programming with TAOX11. The C++11 CORBA Implementation
CORBA Programming with TAOX11 The C++11 CORBA Implementation TAOX11: the CORBA Implementation by Remedy IT TAOX11 simplifies development of CORBA based applications IDL to C++11 language mapping is easy
More informationFAQ CE 5.0 and WM 5.0 Application Development
FAQ CE 5.0 and WM 5.0 Application Development Revision 03 This document contains frequently asked questions (or FAQ s) related to application development for Windows Mobile 5.0 and Windows CE 5.0 devices.
More informationAgilent PNA Microwave Network Analyzers
Agilent PNA Microwave Network Analyzers Application Note 1408-13 Introduction to Application Development Table of Contents Introduction..3 How to Use this Document..3 Basic Administration..4 Registering
More informationHow to test and debug an ASP.NET application
Chapter 4 How to test and debug an ASP.NET application 113 4 How to test and debug an ASP.NET application If you ve done much programming, you know that testing and debugging are often the most difficult
More informationMicrosoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials
Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials 2433: Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials (3 Days) About this Course
More informationUser Manual. 3-Heights PDF Producer API. Version 4.6
User Manual 3-Heights PDF Producer API Version 4.6 Contents 1 Introduction.................................... 2 1.1 Operating Systems..................................
More informationCommon Syntax and Semantic Errors
C H A P T E R 2 Common Syntax and Semantic Errors 2.1 CHAPTER OBJECTIVES To understand the fundamental characteristics of syntax and semantic errors To be able to identify specific common syntax and semantic
More informationThe Win32 Network Management APIs
The Win32 Network Management APIs What do we have in this session? Intro Run-Time Requirements What's New in Network Management? Windows 7 Windows Server 2003 Windows XP Network Management Function Groups
More informationDiskPulse DISK CHANGE MONITOR
DiskPulse DISK CHANGE MONITOR User Manual Version 7.9 Oct 2015 www.diskpulse.com info@flexense.com 1 1 DiskPulse Overview..3 2 DiskPulse Product Versions..5 3 Using Desktop Product Version..6 3.1 Product
More informationUsing Microsoft Visual Studio 2010. API Reference
2010 API Reference Published: 2014-02-19 SWD-20140219103929387 Contents 1.. 4 Key features of the Visual Studio plug-in.. 4 Get started..5 Request a vendor account.. 5 Get code signing and debug token
More informationGetting Started Guide
Getting Started Guide Your Guide to Getting Started with IVI Drivers Revision 1.0 Contents Chapter 1 Introduction....................... 9 Purpose.........................
More informationName: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
More informationPULSE Automation programming in Visual Basic. From BK training lectures arranged by Jiří Tůma & Radovan Zadražil
PULSE Automation programming in Visual Basic From BK training lectures arranged by Jiří Tůma & Radovan Zadražil OLE Automation, general principles Bruno S. Larsen PULSE Software Development Agenda Overview
More informationWindows Scheduled Task and PowerShell Scheduled Job Management Pack Guide for Operations Manager 2012
Windows Scheduled Task and PowerShell Scheduled Job Management Pack Guide for Operations Manager 2012 Published: July 2014 Version 1.2.0.500 Copyright 2007 2014 Raphael Burri, All rights reserved Terms
More informationGetting Started with the Internet Communications Engine
Getting Started with the Internet Communications Engine David Vriezen April 7, 2014 Contents 1 Introduction 2 2 About Ice 2 2.1 Proxies................. 2 3 Setting Up ICE 2 4 Slices 2
More informationLecture 03 Bits, Bytes and Data Types
Lecture 03 Bits, Bytes and Data Types In this lecture Computer Languages Assembly Language The compiler Operating system Data and program instructions Bits, Bytes and Data Types ASCII table Data Types
More informationRationalRose2000e Using Rose Visual Basic
RationalRose2000e Using Rose Visual Basic Copyright 1998-2000 Rational Software Corporation. All rights reserved. Part Number: 800-023324-000 Revision 2.5, March 2000, (Software Release 2000e) This document
More informationNASA Workflow Tool. User Guide. September 29, 2010
NASA Workflow Tool User Guide September 29, 2010 NASA Workflow Tool User Guide 1. Overview 2. Getting Started Preparing the Environment 3. Using the NED Client Common Terminology Workflow Configuration
More informationNetwork Licensing. White Paper 0-15Apr014ks(WP02_Network) Network Licensing with the CRYPTO-BOX. White Paper
WP2 Subject: with the CRYPTO-BOX Version: Smarx OS PPK 5.90 and higher 0-15Apr014ks(WP02_Network).odt Last Update: 28 April 2014 Target Operating Systems: Windows 8/7/Vista (32 & 64 bit), XP, Linux, OS
More informationMicrosoft Windows PowerShell v2 For Administrators
Course 50414B: Microsoft Windows PowerShell v2 For Administrators Course Details Course Outline Module 1: Introduction to PowerShell the Basics This module explains how to install and configure PowerShell.
More informationVisual Basic. murach's TRAINING & REFERENCE
TRAINING & REFERENCE murach's Visual Basic 2008 Anne Boehm lbm Mike Murach & Associates, Inc. H 1-800-221-5528 (559) 440-9071 Fax: (559) 440-0963 murachbooks@murach.com www.murach.com Contents Introduction
More informationOverview. Lecture 1: an introduction to CUDA. Hardware view. Hardware view. hardware view software view CUDA programming
Overview Lecture 1: an introduction to CUDA Mike Giles mike.giles@maths.ox.ac.uk hardware view software view Oxford University Mathematical Institute Oxford e-research Centre Lecture 1 p. 1 Lecture 1 p.
More informationOracle Forms Services Secure Web.Show_Document() calls to Oracle Reports Server 6i
Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports Server 6i $Q2UDFOH7HFKQLFDO:KLWHSDSHU 0DUFK Secure Web.Show_Document() calls to Oracle Reports Server 6i Introduction..3 solution
More informationCHAPTER 2 LITERATURE REVIEW
CHAPTER 2 LITERATURE REVIEW From the beginning to end, my project went through a series of small, but necessary changes. Once I began the programming the code and design interface phase of my design, I
More informationQuartz.Net Scheduler in Depth
Quartz.Net Scheduler in Depth Introduction What is a Job Scheduler? Wikipedia defines a job scheduler as: A job scheduler is a software application that is in charge of unattended background executions,
More informationDeveloping Algo Trading Applications with SmartQuant Framework The Getting Started Guide. 24.02.2014 SmartQuant Ltd Dr. Anton B.
Developing Algo Trading Applications with SmartQuant Framework The Getting Started Guide 24.02.2014 SmartQuant Ltd Dr. Anton B. Fokin Introduction.. 3 Prerequisites.. 3 Installing SmartQuant Framework..
More informationGlossary of Object Oriented Terms
Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction
More informationCobol. By: Steven Conner. COBOL, COmmon Business Oriented Language, one of the. oldest programming languages, was designed in the last six
Cobol By: Steven Conner History: COBOL, COmmon Business Oriented Language, one of the oldest programming languages, was designed in the last six months of 1959 by the CODASYL Committee, COnference on DAta
More informationDeveloping a Web Server Platform with SAPI Support for AJAX RPC using JSON
Revista Informatica Economică, nr. 4 (44)/2007 45 Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON Iulian ILIE-NEMEDI, Bucharest, Romania, inemedi@ie.ase.ro Writing a custom web
More informationGetting Started with STATISTICA Enterprise Programming
Getting Started with STATISTICA Enterprise Programming 2300 East 14th Street Tulsa, OK 74104 Phone: (918) 749 1119 Fax: (918) 749 2217 E mail: mailto:developerdocumentation@statsoft.com Web: www.statsoft.com
More informationPHP MySQL Course Details
PHP MySQL Course Details By Besant Technologies Course Name Category Venue PHP MySQL Scripting Language & Web Development Besant Technologies No.24, Nagendra Nagar, Velachery Main Road, Address Velachery,
More informationCrash Course in Java
Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is
More informationKITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
More informationAn Incomplete C++ Primer. University of Wyoming MA 5310
An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages
More informationObject-Oriented Programming, Iouliia Skliarova
Object-Oriented Programming, Iouliia Skliarova Data types define the way you use the storage (memory) in the programs. By specifying a data type, you tell the sompiler how to create a particular piece
More informationC++ INTERVIEW QUESTIONS
C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get
More informationIntroduction to Visual Basic
Introduction to Visual Basic Microsoft Visual Basic development system version 6.0 is the most productive tool for creating high-performance components and applications. Visual Basic 6.0 offers developers
More informationWeb Presentation Layer Architecture
Chapter 4 Web Presentation Layer Architecture In this chapter we provide a discussion of important current approaches to web interface programming based on the Model 2 architecture [59]. From the results
More informationA C# program structure About variables Predefined Data Types Flow Control Enumerations Arrays Namespaces The Main() method. Console IO Comments
Basics of C# What are we going to study? A C# program structure About variables Predefined Data Types Flow Control Enumerations Arrays Namespaces The Main() method Compilation of C# program Console IO
More informationSAP BusinessObjects Business Intelligence platform Document Version: 4.0 Support Package Live Office User Guide
SAP BusinessObjects Business Intelligence platform Document Version: 4.0 Support Package 8-2013-10-31 Table of Contents 1 About this document..5 1.1 Who should read this document..5 1.2 Document history..5
More informationDebugging Heap Corruption in Visual C++ Using Microsoft Debugging Tools for Windows
Using Microsoft Debugging Tools for Windows Version 10.0 David Dahlbacka Contents Heap Corruption.. 2 Causes of Heap Corruption.. 2 Debugging Heap Corruption.. 2 Debugging Tools..3 Specific WinDbg
Tutorial Ppt
More informationMonitoring of Tritium release at PTC.
Monitoring of Tritium release at PTC. Scope of the project From more than 20 projects supported by Equipment Manufacturing Support group this is one of the simplest. What is nice about it is that elegant
More informationKeywords Compared in Various Languages
Keywords Compared in Various Languages Visual Studio 2010 This topic lists common programming tasks that can be summarized with a language keyword. For more information about tasks that need code examples,
More informationProgramming Fundamental. Instructor Name: Lecture-2
Programming Fundamental Instructor Name: Lecture-2 Today s Lecture What is Programming? First C++ Program Programming Errors Variables in C++ Primitive Data Types in C++ Operators in C++ Operators Precedence
More information1 Abstract Data Types Information Hiding
1 1 Abstract Data Types Information Hiding 1.1 Data Types Data types are an integral part of every programming language. ANSI-C has int, double and char to name just a few. Programmers are rarely content
More informationThis section provides a 'Quickstart' guide to using TestDriven.NET any version of Microsoft Visual Studio.NET
Quickstart TestDriven.NET - Quickstart TestDriven.NET Quickstart Introduction Installing Running Tests Ad-hoc Tests Test Output Test With.. Test Projects Aborting Stopping Introduction This section provides
More informationUsers Guide and Reference
TraffAcct A General Purpose Network Traffic Accountant Users Guide and Reference Version 1.3 June 2002 Table of Contents Introduction..1 Installation..2 Ember..2 SNMP Module..2 Web Server..2 Crontab..3
More informationJonathan Worthington Scarborough Linux User Group
Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.
More informationCompute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005
Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005 Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005.. 1
More informationCross-platform event logging in Object Pascal
Cross-platform event logging in Object Pascal Micha el Van Canneyt June 24, 2007 1 Introduction Often, a program which works in the background or sits in the windows system tray needs to write some diagnostic
More informationNo no-argument constructor. No default constructor found
Every software developer deals with bugs. The really tough bugs aren t detected by the compiler. Nasty bugs manifest themselves only when executed at runtime. Here is a list of the top ten difficult and
More informationIntroduction. Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications
Introduction Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications 1 Computer Software Architecture Application macros and scripting - AML,
More informationSalesforce Mobile Push Notifications Implementation Guide
Salesforce.com: Summer 14 Salesforce Mobile Push Notifications Implementation Guide Last updated: May 6, 2014 Copyright 2000 2014 salesforce.com, inc. All rights reserved. Salesforce.com is a registered
More informationUsing the Remote Access Library
Using the Remote Access Library The Remote Access Library (RACLib) was created to give non-skywire Software applications the ability to start, stop, and control (to some degree) the Documaker Workstation,
More informationDatabase Automation using VBA
Database Automation using VBA UC BERKELEY EXTENSION MICHAEL KREMER, PH.D. E-mail: access@ucb-access.org Web Site: www.ucb-access.org Copyright 2010 Michael Kremer All rights reserved. This publication,
More informationIVI Configuration Store
Agilent Developer Network White Paper Stephen J. Greer Agilent Technologies, Inc. The holds information about IVI drivers installed on the computer and configuration information for an instrument system.
More informationBabylon.NET Release Notes
Babylon.NET Release Notes Changes with version 2.3.3 12/08/2016 > BUG FIX: Filename is used instead of Class name when generating Satellite Assemblies for VB.NET projects. > BUG FIX: Error when using Undo
More informationAdjusted/Modified by Nicole Tobias. Chapter 2: Basic Elements of C++
Adjusted/Modified by Nicole Tobias Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types
More informationsqlite driver manual
sqlite driver manual A libdbi driver using the SQLite embedded database engine Markus Hoenicka mhoenicka@users.sourceforge.net sqlite driver manual: A libdbi driver using the SQLite embedded database engine
More informationUsing the Push Notifications Extension Part 1: Certificates and Setup
// tutorial Using the Push Notifications Extension Part 1: Certificates and Setup Version 1.0 This tutorial is the second part of our tutorials covering setting up and running the Push Notifications Native
More informationDeploying Microsoft Operations Manager with the BIG-IP system and icontrol
Deployment Guide Deploying Microsoft Operations Manager with the BIG-IP system and icontrol Deploying Microsoft Operations Manager with the BIG-IP system and icontrol Welcome to the BIG-IP LTM system -
More informationTitle Release Notes PC SDK 5.14.03. Date 2012-03-30. Dealt with by, telephone. Table of Content GENERAL.. 3. Corrected Issues 5.14.03 PDD..
1/15 Table of Content GENERAL.. 3 Release Information.. 3 Introduction.. 3 Installation.. 4 Hardware and Software requirements.. 5 Deployment.. 6 Compatibility.. 7 Updates in PC SDK 5.14.03 vs.
More informationPHP. Intro, Syntax, Variables, Echo, Data Types
PHP Intro, Syntax, Variables, Echo, Data Types Introduction PHP scripts are executed on the server. What You Should Already Know Before you continue you should have a basic understanding of the following:
More informationIpswitch Client Installation Guide
IPSWITCH TECHNICAL BRIEF Ipswitch Client Installation Guide In This Document Installing on a Single Computer.. 1 Installing to Multiple End User Computers.. 5 Silent Install.. 5 Active Directory Group
More informationOracle Forms Services Secure Web.Show_Document() calls to Oracle Reports
Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports $Q2UDFOH7HFKQLFDO:KLWHSDSHU )HEUXDU Secure Web.Show_Document() calls to Oracle Reports Introduction..3 Using Web.Show_Document
More informationEventlog to Syslog v4.5 Release 4.5 Last revised September 29, 2013
Eventlog to Syslog v4.5 Release 4.5 Last revised September 29, 2013 This product includes software developed by Purdue University. The Eventlog to Syslog utility is a windows service originally created
More informationHow to Write a Simple Makefile
Chapter 1 CHAPTER 1 How to Write a Simple Makefile The mechanics of programming usually follow a fairly simple routine of editing source files, compiling the source into an executable form, and debugging
More informationDialog planning in VoiceXML
Dialog planning in VoiceXML Csapó Tamás Gábor 4 January 2011 2. VoiceXML Programming Guide VoiceXML is an XML format programming language, describing the interactions between human
More informationThe rcs Package. Joachim Schrod. August 2, 1995 (Revision 2.10 of rcs.sty)
The rcs Package Joachim Schrod August 2, 1995 (Revision 2.10 of rcs.sty) 1. An important problem in program development and maintenance is version control, i.e., the task of keeping a software system consisting
More informationDemo: Controlling.NET Windows Forms from a Java Application. Version 7.3
Demo: Controlling.NET Windows Forms from a Java Application Version 7.3 JNBridge, LLC www.jnbridge.com COPYRIGHT 2002 2015 JNBridge, LLC. All rights reserved. JNBridge is a registered trademark and JNBridgePro
More informationAsta Powerproject Enterprise
Asta Powerproject Enterprise Overview and System Requirements Guide Asta Development plc Kingston House Goodsons Mews Wellington Street Thame Oxfordshire OX9 3BX United Kingdom Tel: +44 (0)1844 261700
More informationCAPIX Job Scheduler User Guide
CAPIX Job Scheduler User Guide Version 1.1 December 2009 Table of Contents Table of Contents.. 2 Introduction.. 3 CJS Installation.. 5 Writing CJS VBA Functions.. 7 CJS.EXE Command Line Parameters..
More informationThe C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
More informationToad for Oracle 12.5.1. Installation Guide
Toad for Oracle 12.5.1 Installation Guide Contents Installation Requirements 3 System Requirements 3 Required Windows Privileges 7 Install Toad 8 Install or Upgrade Toad 8 Install Toad on Citrix or Remote
More informationDATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan
DATA 301 Introduction to Data Analytics Microsoft Excel VBA Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca DATA 301: Data Analytics (2) Why Microsoft Excel Visual Basic
More informationAuthoring for System Center 2012 Operations Manager
Authoring for System Center 2012 Operations Manager Microsoft Corporation Published: November 1, 2013 Authors Byron Ricks Applies To System Center 2012 Operations Manager System Center 2012 Service Pack
More informationcore. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt
core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY
More informationSonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)
Sonatype CLM Enforcement Points - Continuous Integration (CI) i Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI) ii Contents 1
More informationRichmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide
Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72 User Guide Contents 1 Introduction.. Leadership by burns. 4 2 Requirements.. 5 3 Important Note for Customers Upgrading.. 5 4 Installing the Web Reports
More information