delphi

Problem in getting Result of " Associators of " Statement in WMI Query ( Invalid Variant Operation ! )

Hi ... I want to Convert this example to Delphi Code , My Problem is in getting result of " Associators of " statement query : procedure TUSB.GetInfo; var WMIService : OLEVariant; DItems, PItems, LItems, VItems: OLEVariant; Drive, Partition, Logical, Volume : OLEVariant; Drives, Partitions, Logicals, Volumes : IEnumVARIANT; IValu...

Delphi/C++ DLL problem - unsigned long vs unsigned int?

(SOLVED: See self-reply. Thanks to those that answered). I'm having a weird problem with a C++ DLL I am loading dynamically into my Delphi 6 Pro program. One of the function calls in the DLL is: __declspec(dllexport) int foo(unsigned int A, unsigned long bitsetVector); I have the function pointer cast in my Delphi function as: foo ...

Delphi library for MIDI input/output?

What is a good Delphi library for MIDI input/output? ...

Delphi 2010 - Rave Report runtime text change problem

Hi, I'm using Delphi 2010 and Rave Reports (comes built in, v. 7.7.0). I have been using this couple for 5 months without any problem. In my company i use two languages, first i use our primary language (Turkish) and when people wants to use another language i change the specific text and memo values according to their tag value. Thi...

Enumerations in Delphi with custom values

Hi! It is possible to declare enums with custom values in Delphi 5 like this?: type MyEnum = (meVal1 = 1, meVal2 = 3); // compiler error Thanks! ...

What do you think of uniGUI, the framework for creating web applications and win32 applications at the same time?

I've just been redirected by a firend on the uniGUI website. In a previous question I asked about a comparison between Raudus and ExtPascal. Now this unigui seems to be an alternative to Raudus, that moreover has the advantage of allowing you to compile the win32 exe at the same time with the same source code (of course if you limit you...

Delphi newbie Questions

Hi I have a couple of newbie questions that I cannot seem to find the answers to. Variables I have noticed that in some apps they declare variables in the private or public sections of the form type however in other apps they declare them in the implementation part of the form, is there a reason for this or is it just user choice? P...

Delphi pointer syntax

I have to pass an argument of the type Pointer to a function from an external DLL. How do I create a pointer to a procedure which I can then pass to the function? Can I also pass a pointer to a class member function to the external function, or will that not work? ...

How to find a button with "value" in html page (Webbrowser - Delphi)

Hi , i have a html page that it have 3 forms with 3 submit buttons . buttons have no name but they have value : <input type="submit" VALUE="Login"> How can i find this button with its value and click on it ? Thanks ...

How to read the current machine NTFS settings?

Before inserting filestream data I'd like to check the following NTFS settings: 1) 8.3 naming status (this is disabled by using fsutil behavior set disable8dot3 1) 2) last access status (this is disabled by using fsutil behavior set disablelastaccess 1) 3) cluster size (this is set with format F: /FS:NTFS /V:MyFILESTREAMContainer /A:...

Types of child classes

I have a question which kind of applies to all languages with static typing and some sort of OOP. If I have a class A, a class B which is a child of A, and a class C which is a child of B and a variable of the type A, can I store instances of B and C in it also? ...

Delphi: MAPILOGON ErrorCode 1

Hi! I tried with many versions of MAPISend, but I everytime got error in one place. The MAPILogon returns with errorcode 1. dwRet := MapiLogon(Handle, nil, nil, MAPI_DIALOG or MAPI_NEW_SESSION, 0, @MAPI_Session); I tried with "MAPISend component", this code: http://prog.hu/tudastar/60044-6/Delphi-Email+csatolt+file+thunderbird.html...

delphi blowfish mode ecb (python converter to delphi)

I know as a programmer that is rare for someone to do, but I actually need it and can not at all so someone needs to convert this small function cryptography python for delphi function: ` from Crypto.Cipher import Blowfish class Blowfish(object): cipher = None def __init__(self, key, mode = Blowfish.MODE_ECB): self.c...

FastReport - How to sum specific groupfooter values to a new footer band.

Hi, i'm trying to do the following with fastreport and delphi. I have a report containing... GroupHeader -------> Key to Customer Salesman MasterData -------> CustomerName, Balance GroupFooter -------> Sum(Balance) of Salesman-1 MasterData -------> CustomerName, Balance GroupFooter -------> Sum(Balance) of Salesman-2 M...

Why don't tfVerticalCenter and tfBottom work as expected in TCanvas.TextRect?

Consider the following code: procedure TForm1.PaintBox1Paint(Sender: TObject); var vRect : TRect; vFormat : TTextFormat; vStr : string; begin vStr := 'This is some text'; vRect := rect(10,10,50,130); vFormat := [tfCenter,tfVerticalCenter,tfWordBreak]; PaintBox1.Canvas.Rectangle(vRect); PaintBox1.Canvas.TextRect(vRect,vSt...

Help please - WM_SYSCOMMAND message from Aero Shake/3D flip

HI I have an application written in Delphi 2006. I have noticed that when running under windows 7 the application does not receive the WM_SYSCOMMAND message from Aero Shake. However if I run the application as administrator then it does receive the WM_SYSCOMMAND when performing Aero Shake. I've tried calling ChangeWindowMessageFilter...

Pick a color from the same shade

I'd like design a chart and set the colors from a single shade. Same way as in Excel's Is there some sort of a formula or algorithm to generate the next shade of color from a given shade or color? Cheers ! ...

Delphi 2010: No thread vs threads - TSQLConnection and TSQLDataSet

Hi everyone, My previous question From the above answer, means if in my threads has create objects, i will face the memory allocations/deallocations bottleneck? I've a case that I need to create TSQLConnection and TSQLDataSet to query data from 5 tables of the database, each table has more than 10000 records. So I will create 5 thread...

Preventing screen grab within Delphi

Possible Duplicate: How can I prevent users from taking screenshots of my application window? So far I have be able to stop the Prt Sc key press and able to clear the clipboard so that my application cannot be screen grab. However as a test I tried used Corel PaintShop pro and an option it has is to import screen capture whic...

Delphi: Encoding Strings as Python do

Hi! I want to encode strings as Python do. Python code is this: def EncodeToUTF(inputstr): uns = inputstr.decode('iso-8859-2') utfs = uns.encode('utf-8') return utfs This is very simple. But in Delphi I don't understand, how to encode, to force first the good character set (no matter, which computer we have). I tried this te...