26 October 1999 Components in Windows, some history and experiences. 1
www.softbit.fi
SOFTBIT
Components in Windows, some history and experiences. Thomas - - PowerPoint PPT Presentation
www.softbit.fi SOFTBIT Components in Windows, some history and experiences. Thomas ORourke Softbit Oy / Managing Director 26 October 1999 Components in Windows, some history and experiences. 1 www.softbit.fi SOFTBIT Presentation 1.
26 October 1999 Components in Windows, some history and experiences. 1
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 2
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 3
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 4
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 5
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 6
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 7
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 8
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 9
www.softbit.fi
SOFTBIT
hInstance = LoadLibrary(“MyDll.dll”);// map DLL to addr pFunc = GetProcAddress(“MyDll.dll” “MyFunction”); (*pFunc)(parm1, parm2); //call func FreeLibrary(hInstance); // unmap dll
MyFunction(Parm1, Parm2) // remember to include MyDll.lib to link time! // Loading and unloading is UNCONTROLLABLE!
26 October 1999 Components in Windows, some history and experiences. 10
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 11
www.softbit.fi
SOFTBIT
class __declspec(dllexport) Boat { int Turn(int Speed); int Turn(int one, int two); virtual int YouDoIt(int one) = 0; //virtual int Okay(int two); }; int Boat::Turn(int Speed) { Speed = Speed + 3; return Speed; } int Boat::Turn(int one, int two) { return 1; } // Taken from BOAT.LIB or BOAT.MAP // 0001:00000000 ??0Boat@@QAE@XZ 10001000 f Boat.obj //0001:00000020 ??0Boat@@QAE@ABV0@@Z 10001020 f Boat.obj //0001:00000040 ??4Boat@@QAEAAV0@ABV0@@Z 10001040 f Boat.obj //0001:00000050 ?Turn@Boat@@AAEHH@Z 10001050 f Boat.obj //0001:00000069 ?Turn@Boat@@AAEHHH@Z 10001069 f Boat.obj // ... // And if we take the comment away from the virtual we get the following: //Boat.obj : error LNK2001: unresolved external symbol // "private: virtual int __thiscall Boat::Okay(int)" (?Okay@Boat@@EAEHH@Z)
26 October 1999 Components in Windows, some history and experiences. 12
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 13
www.softbit.fi
SOFTBIT
Good Book: Understanding ActiveX and OLE by David Chappell. (MsPress)
26 October 1999 Components in Windows, some history and experiences. 14
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 15
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 16
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 17
www.softbit.fi
SOFTBIT
Calling a COM interface
26 October 1999 Components in Windows, some history and experiences. 18
www.softbit.fi
SOFTBIT
pFactory = GetClassFactory(GUID_CDMA_SYSTEM) pFactory->CreateInstance(GUID_PHONE_CONTROL, &pInterface); pInterface->MakePhoneCall(); pInterface->Release();
26 October 1999 Components in Windows, some history and experiences. 19
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 20
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 21
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 22
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 23
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 24
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 25
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 26
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 27
www.softbit.fi
SOFTBIT
WM_COMMAND, BTN_CLICK WM_COMMAND FIRE_BUTTON_EVENT
26 October 1999 Components in Windows, some history and experiences. 28
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 29
www.softbit.fi
SOFTBIT
Nemo Technologies
26 October 1999 Components in Windows, some history and experiences. 30
www.softbit.fi
SOFTBIT
Adapter Handler (GSM) IHandler Serial port IAdapter Mobile Phone I M
i l e P h
e User Interface High level commands Circular Buffer / Shared memory structure DataBuffer/ Shared memory structure Phone State Indication Events Update state (after event) SendMessage GetMessage Drawing graphs
26 October 1999 Components in Windows, some history and experiences. 31
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 32
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 33
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 34
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 35
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 36
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 37
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 38
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 39
www.softbit.fi
SOFTBIT
Component (DLL) Framework (EXE) MFC (2) (1) (3)
(2) Callback function (3) Windows messages (4) Communicator handling
CView Main Window (3)
26 October 1999 Components in Windows, some history and experiences. 40
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 41
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 42
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 43
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 44
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 45
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 46
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 47
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 48
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 49
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 50
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 51
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 52
www.softbit.fi
SOFTBIT
26 October 1999 Components in Windows, some history and experiences. 53
www.softbit.fi
SOFTBIT
Sam.exe (interprets measurement
indexing, highly efficient) Measurement data Visual Basic program Formatted data
Quality Power level Number of dropped calls Average quality per dropped call
Commands
26 October 1999 Components in Windows, some history and experiences. 54
www.softbit.fi
SOFTBIT
Dim SAM As AutoApplication Dim ret As Boolean Set SAM = New AutoApplication Set filecollection = SAM.Workspace.Item("files") Set datasetcollection = SAM.Workspace.Item("datasets") Set file = filecollection.Add ret = file.Load(“Filename and path”) Set dataset = datasetcollection.Add ret = dataset.SetFile(file.Id) dataset.Filter(“$EventType = MSP”) For counter = 1 To dataset.Count ActiveSheet.Cells(counter, 1).Value = dataset.GetEventParameters(counter) Next counter dataset.Close file.Close