So far, my understanding of COM+ in terms of registering is that it provide another way to register a COM.
The COM consuming applications (COM client) have nothing to change.
Be aware, it still can be unregistered by using Regsvr32.exe.
So far, my understanding of COM+ in terms of registering is that it provide another way to register a COM.
The COM consuming applications (COM client) have nothing to change.
Be aware, it still can be unregistered by using Regsvr32.exe.
If the printer support PDF Direct Printing, LPR command line tool can be used for sending an PDF file directly to the printer, for example:
LPR –S <ip address of the printer server> –P “Printer name on the server” test.pdf
Please note:
procedure TCustomRadioGroup.ReadState(Reader: TReader);So, what is the deal of above difference?
begin
FReading := True;
inherited ReadState(Reader);
FReading := False;
if HandleAllocated then //<--- Delphi 2007 has no this checking!!!
UpdateButtons;
end;
procedure TForm1.FormCreate(Sender: TObject);It is mystery to me that why it is doing that checking in Delphi XE.
begin
…
TRadioButton(RadioGroup1.Controls[2]) …
…
end;
varWhat I was wondering was why it was using Win.Ini? I thought it had been discarded since long time ago, but above code is still working well on my Windows7 system.
LDeviceList : TStringList;
LIniFile : TIniFile;
begin
LDeviceList := TStringList.Create;
LIniFile := TIniFile.Create('win.ini');
with LIniFile do
try
ReadSectionValues('devices', LDeviceList);
ButtonPrinter.Enabled := LDeviceList.Count <> 0;
…
finally
Free;
end;
; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1
CMCDLLNAME32=mapi32.dll
CMC=1
MAPIX=1
MAPIXVER=1.0.0.1
OLEMessaging=1
[MCI Extensions.BAK]
3g2=MPEGVideo
3gp=MPEGVideo
3gp2=MPEGVideo
3gpp=MPEGVideo
aac=MPEGVideo
adt=MPEGVideo
adts=MPEGVideo
m2t=MPEGVideo
m2ts=MPEGVideo
m2v=MPEGVideo
m4a=MPEGVideo
m4v=MPEGVideo
mod=MPEGVideo
mov=MPEGVideo
mp4=MPEGVideo
mp4v=MPEGVideo
mts=MPEGVideo
ts=MPEGVideo
tts=MPEGVideo
But the printer button was on when I ran the application and there was definitely no other code controlled the printer button.
So I thought I had to debug the code. I put a break point on the line “ButtonPrinter.Enabled := LDeviceList.Count <> 0;” and it did run to there, and the LDeviceList did contain the correct printers installed on my Windows7!
So where was the real Win.Ini file it read from? Could not be the one in Windows folder. And the LIniFile does not tell you where the Win.Ini file was.
Then I launched VMMap.exe to view the memory and files were using by the application. I use it a lot to find out which DLL files the application is using to confirm the application is using the right one when there are a few versions of the same DLL stored in the system. But there is no sign of Win.Ini file in VMMap. Maybe FileMon is more proper for this case, so I ran FileMon and set its filter to show Ini file’s activity only, but there was no sign either!
That became very interesting now. The code was reading something from the file but the system basically told you that sorry there was no such file has been opened and read.
What would you do then if you were me?
In other kind of installer which is made by tools like Inno or NSIS, the installer can be run as many instances as you want, but there can only be one instance of Windows Installer running, so I was wondering how installers (.MSI) which are using Windows Installer to install files install pre-requested software which is also using Windows Installer?
1. Bigger than3.5".
3.2" is just big enough for A4 size PDF, but it hurts for long time reading.
2. Auto-focus camera. Barcode scanner does not work well with camera that can't auto-focus.
3. A louder speaker. For alarm in the morning of course.
In Delphi, we can control an Edit’s length and what can go in in the event KeyPress, for example, I have found my old code (code I have inherited from somebody else) do such things like this:
//Control only numbers can go in
if not (CharInSet(Key , ['0'..'9', #8])) then
key := #0;//Control the length
if (Length(edtFileNumber.Text) > 8) and (key <> #8) then
key := #0;
But there are easier ways, they can be accomplished by the component’s properties (confirmed in Delphi XE).
For example, the property TLabeledEdit.MaxLength can control the length of editing text.
The property TLabledEdit.NumbersOnly can control only numbers can go in.
(Please note that I have found a lot places using above code-control pattern in my old code but I have not change all of them to property control, the reason will be worth another topic, long in short, that is about risk control while changing working code)
VBScript 5.0 has a new feature which is allow you to assign a function to an event handler. In a web page, it looks like this
Window.click = getref(window_click)
It is easy isn’t? That is because “Window” is accessible to the script engine, what if it is not? For example, how do we pass
in the event handler’s variable to the script so that the script can assign a function to it, or vise versa, how do we return the
function’s address back to the host application so that it can assign it to the event handler?