I'm a windows developer looking for implementation of priting support for Windows Mobile 6.5.
As the WM6.5 is based on the Windows CE 5.0, I have gone through the architecture of Printing in Windows CE and what I have realized from the Windows CE Printer architecture is :
For a USB class printer the main components required for printing in Windows CE apart from Display driver and GDI components would be :
Printer driver : PCL.dll
The underliying port driver for USB class driver : USBPRN.dll
These components' source code exist in the driver samples provided by the WinCE 5.0 platform builder.
Though these components exist no third parties (ex: PrintBoy,PrintCE ) seems to be utilising them.
My Queries are:
1.Can I use the Microsoft supplied source code of these compenents as it is to support Printing in Windows Mobile?
2.According to Microsoft's Shared source License agreement,are there any source code usage viaolation if I use them?
3.Can I use the source code of PCL and USBPRN to support in Windows Mobile as it is? or do I need to modify it?
(I assume Windows Mobile have GDI and Display driver components by default.)
Thanks.
Sree.
I Don't believe WinMo includes the printer pieces for CE.
I'm not a lawyer (nor do I play one on TV) but my interpretation is that you can't take the pieces from Platform Builder and use them in your WinMo OS. You are licensed to modify them if you need and use them in your own custom OS.
See #2. PCL would probably work as-is, but I'm guessing the USB printer driver might need at least some configuration work for your platform.
Related
I have a specific USB device that has it's own driver for Win7.
It works fine in my .NET application, I'm using drivers functions (C++) to manipulate device.
Now I'm trying to get this device work in LabVIEW.
Is there a way to somehow adapt existing driver for it? Or it is useless and I need to write completely new driver for LabVIEW?
For now I created a driver using "NI-VISA Driver Wizard" so that "NI MAX" and "NI-VISA Interactive Control" detect my device. But I don't know what to do next?
Compile the driver C source files as a dll.
https://forums.ni.com/t5/Measurement-Studio-for-VC/How-to-create-a-DLL-file-from-a-C-file/td-p/866863
Then import the dll into LabVIEW.
http://digital.ni.com/public.nsf/allkb/DCB90714981A1F148625731E00797C33
As highlighted by Prain, the following is an example describing how C/ dll can be used in LabVIEW
https://forums.ni.com/t5/Example-Program-Drafts/Using-Existing-C-Code-or-a-DLL-in-LabVIEW/ta-p/3499233
I'm using Delphi 10.1 on Windows 10
When I run the OpenPictureDialog.Execute command
on some app it's open File Explorer with a preview area and on others without.
I have exactly the same properties on both cases.
What can cause the difference?
Thanks Sorin
function GetOpenFileName; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameA; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameW; external commdlg32 name 'GetOpenFileNameW';
In older versions on Delphi it used a Windows API function in comdlg32.dll to open a file. I would think it is the same in newer versions. What you see in terms of preview etc. is down to Windows settings.
The dialog shows to the user will be consistent with other file open dialogs they see on their system.
I'm using ACOS3X smart cards in my Delphi application for user authentication. Everything is fine in Windows XP, but in Windows 7, every time I put the card into the reader (which is ACR38-CCID), windows tries to install a driver for it, to no avail. This does not affect my application in any way, but it's really annoying. Should I write a driver for my card just to satisfy Windows 7? And, if yes, could someone please tell me if it's possible to create drivers with Delphi?
This is what Windows 7 (and IIRC also Vista) does. If you insert a smart card, it tries to locate a minidriver through Windows Update.
Not sure if it works, but you can maybe modify Windows registry to include the necessary entry for your card (but not point to a working implementation).
Look into Windows Minidriver Specification (available from MS) and the "discovery" section in that document.
I would like to know if there are any open source components available for Delphi XE-2 that can connect to postgreSQL other than using outdated techniques like ODBC.
For now just Win32 support is needed, but if Win64 and OS-X support is also available that would be a bonus.
I googled around a bit, but the only lib that's available (ZEOS) looks like it is no longer in active development.
There does seem to be a patch for Delphi XE2 but I could not get it to compile.
As of right now: No.
You either route through ADO -> ODBC, dbExpress -> ODBC (for XE2*, see below), hope to make Zeos work, or pay for one of the various commercial components (PostgresDAC, DevArt, or AnyDAC, to name a few).
While Delphi XE2 comes with an ODBC driver for dbExpress, it's only for the Enterprise SKU and higher -- it's not available in Pro. For XE2 Pro users and users of older versions of Delphi there's Open dbExpress. I've tried using it before, but always had trouble with it. It's been updated since I've last used it though, so maybe whatever problems I had (which may have been my own fault) aren't an issue anymore.
All this said, ODBC isn't really an outdated technology. On non-Windows systems it seems to be the preferred DB-agnostic API. That said, it seems that many environments prefer to implement their own connectivity (e.g. QT, GNOME) rather than relying on ODBC exclusively. However, for the PostgreSQL project itself, their default (and best supported) connectivity API is ODBC.
Update: In fact, Microsoft is making ODBC their premier connectivity API for SQL Server starting with SQL Server 2002 (codenamed Denali). See: Microsoft Aligning with ODBC and Microsoft is Aligning with ODBC for Native Relational Data Access. This is the last release that will support OLE DB, and Microsoft is encouraging developers to use ODBC.
Turns out you can get ZEOS to work on Delphi XE2 and as far as I've tested all DB functionality works.
Here are the steps to follow:
Use SVN* to download the Delphi XE2 archive for ZEOS at:
https://zeoslib.svn.sourceforge.net/svnroot/zeoslib/branches/testing
Put the zeos folder in the appropriate place, I'm assuming c:\borland
Do not open Delphi yet, but instead open
C:\borland\zeos\packages\delphi16\ZComponent.dpk in wordpad and remove the trailing {$IFDEF} (remember to keep the ; in place).
Open c:\borland\zeos\packages\delphi16\ZeosDbo.groupproj.
Choose build all
Open c:\borland\zeos\packages\delphi16\build in explorer, copy all .bpl files and copy those to c:\borland\delphixe2\bin
Component -> install packages -> [add...] and choose
c:\borland\delphixe2\bin\ZComponentDesign.bpl
as a SVN client I've downloaded SVN-tortoise from: http://tortoisesvn.net/downloads.html
Combined with both the SVN plug-ins for Firefox
The background to this query was this question.
I have installed this driver for Firebird and placed it within the path (system32) used by the IDE. The XE Data Explorer recognises the driver, and it is possible to create a connection using the Data Explorer. Trying to view tables or any other database element through this connection results in the error described in this question. As far as I can see #Alejandro Jourdan has not obtained a solution to this problem, and I can find no solution on any of the support sites for Firebird or for Delphi XE.
The second problem comes when I create a TSQLConnection using this connection. The connection works to the extent that it generates the login prompt to the database, but when it tries to open the connection I get the error message: 'file is not a valid database' This error message is (sort of) reproducible from within the Data Explorer which gives the following error:
I/O error during "CreateFile(open)" operation for file [database path] Error while trying to open file. Access is denied..
The database is valid and can be opened from the Firebird command line utility, and from a Data Base browser.
Environment:
Machine: Lenovo Thinkpad W510
OS: Windows 7 Ultimate 64bit
Delphi: Embarcadero® RAD Studio XE Professional Version 15.0.3953.35171
Database: W1-V2.5.0.26074 Firebird 2.5 (64 bit)
Also Installed:
Embarcado Borland® Developer Studio 2006 Enterprise Version 10.0.2288.42451 Update 2 (XP Version)
Borland Delphi Version 7 (XP Version)
EDIT:
See my own answer below. This edit has removed extensive detail that proves to be unnecessary in the light of that answer, while retaining the core of the question, and the links contained within it.
The first thing that sticks out to me is that you're using the 64-bit version of Firebird, and that you mentioned it comes with both a 32- and 64-bit driver. Are the DLLs named the same? If so, I suspect that the IDE/OS are trying to load the 64-bit version of the DLL in a 32-bit application, which isn't possible (32-bit apps can't load 64-bit drivers, and vice versa).
Try one of two things:
First, if the DLLs have the same name, rename the 64-bit version temporarily, and restart the IDE. Then try again.
Try installing the 32-bit version of Firebird, even though you're running a 64-bit OS.
The basic question I had (in part I) was:
I want to install a Firebird database
driver, and to have it available
within the Delphi XE IDE. I want the
database driver to be usable on the
same basis as other, supplied database
drivers (eg Interbase, SQL - from
within the Data Explorer in the IDE).
I have obtained an appropriate driver.
After considerable investigation I have found that it is not possible to achieve the integration into the Delphi IDE that I was trying to achieve. This is because the Data Explorer is a .NET application and the available DBExpress drivers (here and here) are just not compatible with .NET. I understand that I can use the drivers by setting up the parameters appropriately, in both the IDE and by programming in the application I am developing.
I have drafted this answer to assist others to avoid this particular blind alley. I am also editing the part II question in order to remove a lot of the detail, that proves to be unnecessary in the light of this answer.