Using Visual Studio DLL in Delphi 7???


Bo Berglund wrote: > I need to use a DLL from another company to interface to their > equipment from my Delphi 7 application. > The software people over there have handed me the DLL plus a few H > ...
Posted On: Tuesday 27th of November 2012 12:57:32 AM Total Views:  260
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




Horizontal band using bho in windows explorer

I am invoking a horizontal band using bho in windows explorer while starting up I tried the following, but it doesnt invoke, results in an error "Invalid variant operation", the code is in delphi. Following is the code snippet IE := pUnkSite as IWebbrowser2; if Assigned(IE) and (InitialiseShellType = stWindowsExplorer) then begin BandId.vt := VT_BSTR; BandId.bstrVal := '{CC546B07-8E2E-4D7B-AAF6-BDDBFDD738F5}'; vtShow.vt := VT_BOOL; vtShow.boolVal := True; vtSize.vt := VT_INT; vtSize.IntVal := 0; IE.ShowBrowserBar(BandId,vtShow,vtSize); IE := Nil; end; From some other newsgroup, I gathered that there might be something wrong with boolval := True, which I am not very sure. I would appreciate if any one could shed some light on solving this
VIEWS ON THIS POST

173

Posted on:

Wednesday 3rd October 2012
View Replies!

Updates incredibly confusing (RANT ALERT)

Maybe this is just me, but I'm finding it incredibly confusing and heavy going to install and update my Delphi 2007 for Win 32. I've just built a new computer and am reinstalling everything. Of all the apps I've got, Delphi takes the biscuit for being the most confusing to bring up to date. Just follow me through, here, and tell me if it's me being thick, or CodeGear being unhelpful, would you I've got Delphi installed and the Version number in Help | About is 11.0.2804.9245. I want to know if this is up to date or not. So I go to the Registered User Downloads page and find a mass of confusion. For instance, I spot an ISO called 'Delphi 2007 for Win32 R2/Update 3 ISO'. My first thought is "What the heck's R2". Presumably it's a later version of the product I bought (back in Feb 07). It also mentions Update 3. But that's confusing, because listed above it are 'Delphi 2007 for Win32/Update 3' as a zip or autoinstaller. So does it mean R2 includes Update 3 And do I want Update 3, or the full blown R2/Update 3 In fact, are there two different Update 3s One for the original Delphi 2007, and one for Delphi 2007 R2 So as well as having a product name - Delphi 2007 - we also have Release numbers and Update numbers, which seems one too many to me. Anyway....... ......there are three links mentioning Update 3. My question is, do I need it So I follow one of the links to find...... no pre-requisites mentioned!! It does not say what Version number it applies to, nor what the new Version number will be after installing it. UNBELIEVABLE. Not to worry, let's look a bit higher up the list....... ......and I see that the Updates suddenly get months instead of numbers!! And then, as my eyes wanders ever upwards I find, astonishingly, that as well as Release numbers, Update numbers and Update months, we've now got Hotfixes as well!!! To top it all, none of these seem to appear in the Help | About box in Delphi, which just seems to show a four-field Version number, giving us: Release Numbers Update Numbers Update Months Hotfixes Version numbers (in the application) ......and no obvious correlation between them. This is just unbelievable. Why on earth can't Codegear just do what most other vendors do and stick to version numbers throughout, viz: 11.0, 11.1, 11.2, etc. Simple. Yes, I know they increment the third and fourth digit fields in the version number in the Help About box, but nowhere on the Registered User Downloads page do they tell you which digits relate to which Release Numbers, Update Numbers, Update Months or Hotfixes. Honestly, CodeGear, this is just hopeless. NO OTHER PRODUCT (and I use plenty) has such a confusing system of updates, patches, hotfixes and upgrades as Delphi. Furthermore, if I updated any of my own software like this, I'd be lynched by my users! I'm still only moderately confident about how to proceed, but as far as I can glean, it's: 1/ Original product 2/ Update 3 3/ December 07 Update 4/ April 08 Hotfix 5/ Help Update 3 Does that seem right Is there any chance at all of CodeGear getting a grasp on this situation SteveT PS: I've just spotted something else, which I almost couldn't believe. CodeGear releases these "Updates", but tells you to run "setup.exe /upgrade". Yes, "upgrade", not "update"!
VIEWS ON THIS POST

148

Posted on:

Wednesday 3rd October 2012
View Replies!

BDS 2006 using Delphi win32

A few days ago I noticed that I quit getting debug info when I put a break point on a variable, stop during runtime and hold the cursor over the variable. Nothing happens. I am not even told it was optimized. Can someone help me , Larry Killen wrote: > Actually, when I hold the cursor over a variable, it flickers as if > it is trying to retrieve a value. > > I think something is screwed up. If you are sure the appropriate checkbox in the Tools->Options dialog (under Code Insight) is checked then it looks like your system has gotten into a state where hint windows are not displayed on top of the window they belong to but beneath it. I have seen that even for the popup hints of the Windows taskbar buttons, so it's not Delphi specific. A reboot of the machine fixes it, at least for a time. -- Peter Below (TeamB) Don't be a vampire (http://slash7.com/pages/vampires), use the newsgroup archives : http://www.tamaracka.com/search.htm http://groups.google.com
VIEWS ON THIS POST

180

Posted on:

Wednesday 3rd October 2012
View Replies!

BDS.exe 2006 IDE using 100% of CPU for hours

I have a dual processor AMD 4400 and I noticed the machine was running kind of slow. The task manager shows BDS.Exe using 50% of the processors (100% of 1 processor). My compiled program is not running. Nothing is running on the machine, yet the IDE takes 100% of one of the CPU's for several hours even though the IDE is just sitting there doing nothing. Exiting Delphi and restarting it and it loads my application and after a few seconds it is down to 0 CPU cycles (which is what I expect). Then I run my application within the IDE and exit the program so it returns to the IDE, and it behaves fine with 0 CPU cycles. So why does it at times hog all the CPU Is it doing my taxes in the background Decoding signals from SETI Calculating Pi to the last decimal place I can understand if the Delphi IDE uses 100% CPU for a few seconds, but for a few hours when there is nothing else running What's up with that Sam
VIEWS ON THIS POST

184

Posted on:

Thursday 4th October 2012
View Replies!

how to retrieve the system variables 'TEMP' using Delphi 7 in Win XP environment

I try to use SysUtils.GetEnvironmentVariable('TEMP') but it only return the user variables 'TEMP', not the system variables 'TEMP'
VIEWS ON THIS POST

175

Posted on:

Friday 5th October 2012
View Replies!

Problem when using multiple instances of forms

I have got some problem when using multiple instances of forms. Some form creates 2 instances off a non modal data entry form (TFCT91100F) at runtime. Each data entry form creates in its FormCreate A datamodule (TFCT91100DM) and a modal totalisation form (TFCT91103F). The totalisation form is shown automitically when all data entry is done. Everything works fine when only 1 instance off the data entry form is active. Now when 2 instances are active and the first created instance is focused, the private var FCT91100FM used in my totalisation form (TFCT91103F) which, *should* point to the corresponding instance of the data entry form (TFCT91100F), points to last created instance of the data entry form (TFCT91100F). I tried setting the all the form/datamodule names to '' but that didn't work. Now when i don't setup a private var FCT91100FM in my totalisation form but cast TFCT91100F(Self.Owner) everywhere i need a reference to my data entry form (TFCT91100F) in my totalisation form (TFCT91103F) then everything works fine again. In short, when switching between 2 instances of my data entry form (TFCT91100F), the right instance of my data entry form (TFCT91100F) and totalisation form (TFCT91103F) are used but a private var setup in my totalisation form (TFCT91103F) always points to the last created instance of my data entry form (TFCT91100F). Anyone can help me out Data Enry form -------------- unit FCT91100u; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, _FrmSBProcMasterDetail, FCT91100D, FCT91103u; type TFCT91100F = class(TFormSBProcMasterDetail) ... private { Private declarations } ... public { Public declarations } FCT91100DM: TFCT91100DM; FCT91103FM: TFCT91103F; end; var FCT91100F: TFCT91100F; implementation {$R *.DFM} procedure TFCT91100F.FormCreate(Sender: TObject); begin inherited FormCreate(Sender); FCT91100DM := TFCT91100DM.Create(Self); FCT91103FM := TFCT91103F.Create(Self); end; {FormCreate} Totalisation form ----------------- unit FCT91103u; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, _FrmSBProcDruk; type TFCT91103F = class(TFormSBProcDruk) ... private { Private declarations } ... public { Public declarations } ... end; var FCT91103F: TFCT91103F; implementation uses FCT91100u; var FCT91100FM: TFCT91100F; {$R *.DFM} procedure TFCT91103F.FormCreate(Sender: TObject); begin inherited FormCreate(Sender); if (Self.Owner).ClassType TFCT91100F then begin ModalResult := mrAbort; Exit; end; FCT91100FM := TFCT91100F(Self.Owner); dsrDtsFDKAS.DataSet := FCT91100FM.FCT91100DM.DtsFDKAS; dsrQrFDKAS_DET.DataSet := FCT91100FM.FCT91100DM.QrFDKAS_DET; end; {FormCreate}
VIEWS ON THIS POST

116

Posted on:

Saturday 6th October 2012
View Replies!

Is it good idea to Save/Load large TObjects using Stream ReadComponent/WriteComponent

I use TStream.ReadComponent and TStream.WriteComponent to save my Persistent object(TClientServer, can be up to 50mb in size) to stream and move to another application and load it again. This code works fine for some time and then it start throwing exception "Out of memory" on line AStream.ReadComponent(ASaver); while trying to load received stream to Object. Is this code suitable for large TObjects transferring
VIEWS ON THIS POST

132

Posted on:

Sunday 7th October 2012
View Replies!

Faxing using a USB modem

Hi , my name is Luc and I'm in need of some help regarding the use of USB modem. I have been using Async Pro to send faxes for many years using modem through serial port but now, these are hard to find and I'm not sure that Async can manage USB modem (that would have been nice). I'm using Delphi 5, what is the best tool to send faxes through a USB modem I need to dial without the user input and I'm sending a BMP file (like Async pro was doing). I'm not used to modem programming, if someone would point me in the direction of a easy to use component that would be a big help for me Delphi 2007 solution may be ok too but the best would be something in D5.
VIEWS ON THIS POST

105

Posted on:

Monday 8th October 2012
View Replies!

using RAPI from Delphi 7

I have downloaded and installed RAPI interface library from the Codegear site and it seems it works because the 2 examples that copy files from/to Pocket PC work very well. I am trying to list all the files in My Documents directory on the Pocket PC using CeFindFiles, passing as a directory \My Documents\ or \My Documents\*.*, but the function returns false and CEGetLastError or getrapierror returns 0. Here is how I call the function, please let me know if I am doing anything wrong: function GetPocketPCFileListPerDir(astrDir: String): String; var Find_Data: PCe_FIND_DATA_array; file_count: DWORD; filename: String; I: Integer; myerror:longint; find_flag:boolean; begin result := ''; file_count := 0; myerror := 0; if astrdir = '' then exit; find_flag := CeFindFiles(PWideChar(wideString(astrDir)), FAF_ATTRIB_CHILDREN + FAF_NAME, file_Count, FIND_DATA); if find_flag then try for i := 0 to file_Count+10 do begin fileName := ''; fileName := string(FIND_DATA[i].cFileName); if fileName '' then result := result + ',' + filename; end; except end; myerror := getrapierror; end; Thank you, Vadim
VIEWS ON THIS POST

119

Posted on:

Monday 8th October 2012
View Replies!

Show message box without pausing

I want to show the user a message box, but I don't want to pause execution of the rest of the code until after they click the OK button. What's the easiest way to accomplish this Thank you, Dan
VIEWS ON THIS POST

157

Posted on:

Monday 8th October 2012
View Replies!

Compiler directives - using to control USES statement

I want to USE unit1 in unit2 when unit2 is in one project, but not in another. So, I tried this in unit2: unit unit2.pas .... implementation {$IFDEF WEBAPP} uses activitylog, rundate, BackrmConstants; {$ELSE} uses activitylog, rundate, BackrmConstants, unit1; {$ENDIF} .... end. Then in my project file at the top (for the web app version of unit2), I have library Project1; {$DEFINE WEBAPP} .... end. However, when I compile unit2 as part of the project where the $DEFINE is, the USES in the $ELSE tries to compile and dies for lack of unit1. What am I missing Does the define not apply outside the file it's in Jeremy
VIEWS ON THIS POST

115

Posted on:

Tuesday 9th October 2012
View Replies!

using D2007 RTL on D7

hi there, some question regarding the use of D2007 RTL on D7 1.is there any worth using D2007 RTL on D7 2.how much the different between D2007 RTL and D7 3.is this mainly about FastCode core (and maybe FastMM), cause i think D2007 have it while D7 didn't (not integrated by default) don't ask me if it possible to use D2007 RTL on D7 cause someone has already tried it (and sucess\t), you can do search on Delphi 7 Lite (don't ask me where to get it, since it maybe illegal software, except it's allowed by newsgroup) here are some text from the readme : WHAT IS DELPHI 7 LITE ------------------------- Delphi 7 Lite is a standard installation of Delphi 7 Enterprise in which: - Applied all the official updates. - the setup options have been discarded EXCEPT source code. - Included programming font Consolas (recommended size 10 with ClearType enabled). - Editor color settings of Delphi 2006. - Replace the D7 RTL to D11(Delphi 2007) RTL(FastMM and FastCode Core) (Optional). - the setup options have been discarded EXCEPT source code. - Update 1.1 has been installed (version of the IDE is 7.0.8.1), these patches are applied: Update ActionBar to 7.01 - Unneeded files have been removed. - Can import ActiveX Componets - Supports MIDAS development. - Supports CLX Design development. - Supports IntraWeb 5.0 development. - Supports RaveReport 5 development. - Installation do not copy of any files to system directory. - Green Edition Integrated,you can copy the entire delphi directory to other place directly ,run file D7LiteReg***.exe to register easily. - Dynamic Compile after Installation to generate RTL/VCL and other components .DCU Files,thus minish size of the installation file. ...... and so on PS: D2007 = Delphi 2007, D7 = Delphi 7 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
VIEWS ON THIS POST

108

Posted on:

Tuesday 16th October 2012
View Replies!

Converting BMP to APF using Apro Fax converter

I am trying to send a Fax using APRO components but the conversion from BMP to APF format is not very good. I am using the demo app to convert a bmp to APF file. I have tried all the combination available in the options. Is it possible to get this conversion to work properly or should I look for some other components.
VIEWS ON THIS POST

131

Posted on:

Tuesday 16th October 2012
View Replies!

BDS 2006 IDE memory leaking causing error msg during editing

I am using BDS 2006 Architect and am experiencing memory errors that are popping up while I am editing code. What seems to be happening is tha BDS 2006 is having memory leaks while one is editing and compiling. This cam be monitored with the Win Task Manager Processes. Eventually, the bds.exe process gobbles up enough memory where it starts to cause error dialogs to pop-up while one is editing code. Has anyone seen this Is there a Fix I have already applied the 2nd Updates patch, but no difference. Matt
VIEWS ON THIS POST

189

Posted on:

Tuesday 16th October 2012
View Replies!

using RAPI from Delphi 7

I have downloaded and installed RAPI interface library from the Codegear site and it seems it works because the 2 examples that copy files from/to Pocket PC work very well. I am trying to list all the files in My Documents directory on the Pocket PC using CeFindFiles, passing as a directory \My Documents\ or \My Documents\*.*, but the function returns false and CEGetLastError or getrapierror returns 0. Here is how I call the function, please let me know if I am doing anything wrong: function GetPocketPCFileListPerDir(astrDir: String): String; var Find_Data: PCe_FIND_DATA_array; file_count: DWORD; filename: String; I: Integer; myerror:longint; find_flag:boolean; begin result := ''; file_count := 0; myerror := 0; if astrdir = '' then exit; find_flag := CeFindFiles(PWideChar(wideString(astrDir)), FAF_ATTRIB_CHILDREN + FAF_NAME, file_Count, FIND_DATA); if find_flag then try for i := 0 to file_Count+10 do begin fileName := ''; fileName := string(FIND_DATA[i].cFileName); if fileName '' then result := result + ',' + filename; end; except end; myerror := getrapierror; end; Thank you, Vadim
VIEWS ON THIS POST

141

Posted on:

Tuesday 16th October 2012
View Replies!

using TMediaplayer without a device

I want to use a TMediaPlayer's controls for controlling run/stop/pause functions within my app. The app is not a mutimedia app and therefore has no DeviceType.. I am hooking the OnClick event and doing my own thing depending on the button clicked on. Trouble is, TMediaplayer complains with a "No MCI device open" exceptions after my Onclick handler returns. How do I make the component not try to control something TIA Ross
VIEWS ON THIS POST

255

Posted on:

Tuesday 16th October 2012
View Replies!

Adding component to Structure view using Component Palette in D2007

I'm still trying to learn the differences between D2007 and my old Delphi 7. In Delphi 7, you could click on a component in the Palette, and then click somewhere in the Structure view and it would add a new component at that location. For example, if you had a TPanel on the form, then selected a TLabel in the Palette and then clicked on the TPanel in the D7 "Structure" view (it was called something else in D7 I think), then it would put the TLabel in the TPanel. In D2007, I don't seem to be able to do this with the new Tool Palette and the new Structure view. If I double-click a component in the Palette, it adds it to the top level of the form, and then I need to drag it into it's parent destination in the Structure view. I cannot drag a component from the Palette into the Structure view. So, can someone explain how I can easily add the currently selected component from the Palette to a specific parent location in the Structure view I have some very complex forms with lots of levels of embedded panels on various PageControl pages, so it's not trivial to just drop a component to the correct parent location on the visual form designer (which is why I tend to use the Structure view a lot).
VIEWS ON THIS POST

91

Posted on:

Tuesday 16th October 2012
View Replies!

how to sort numbers based on there representation using TStringList?

Iliya wrote: > Now, how to sort some items like strings, numbers and other simple > type likes based on their visual representation using TStringList > We dealing here with a big list of pairs. First thing that comes in ...
VIEWS ON THIS POST

99

Posted on:

Saturday 10th November 2012
View Replies!

About using C++ Library (static library)

Hi i have a big c++ library (static library). i want use it in delphi but i dont know how can i do that! i can easily use c++ dyanmic library in delphi (.DLL) but how can i use c++ ...
VIEWS ON THIS POST

125

Posted on:

Thursday 15th November 2012
View Replies!

Why would this code fail on Vista? (Open file for read using SYstem.Resetraises error 104 on vista)

Warren Postma wrote: > What on EARTH is happening when you call Reset() that causes it to > raise a permission exception on Vista Wild guess: probably a sharing lock. Use SysInternals FileMon to be sure. -- Craig Stuntz [TeamB] ...
VIEWS ON THIS POST

318

Posted on:

Tuesday 27th November 2012
View Replies!