i want to Get/Set the mic level using delphi? that works on vista and xp uses only mmsystem, any freeware component will do as long as no external dll's on the run.
and also getting the peak level.
I have not tried, but there has been described by Vladimir M. Todorov.
try the Freeware component.. http://www.delphiarea.com/products/delphi-packages/waveaudio/ it doesnot use any external component.
Related
Presently I am developing a small security application in Delphi. It is intended to be installed in Windows XP and higher OS-s and almost finished, but I'd like to implement the feature to scan MS Office files while opening. To that end, I'm planning to use IOfficeAntiVirus interface. I am trying to realize using the scan method of the interface based on the article by Serge Perevoznyk (http://www.delphi-central.com/MS_Office_AV_API.aspx).
The original example supposed to display a message box when a file is opened, however it does not, although I tried it on different versions of Windows and Office. I compared this solution with the information on MSDN. It seemed to be correct. I suppose there should be some additional settings in the Windows Registry which I missed to make. Can anyone give me some hint where shall I look for the solution?
You do not use IOfficeAntiVirus, you implement it.
You need to create a new ActiveX Library that contains a new ActiveX Control whose implementation class implements the Scan() method. In the Control's registration code, you have to use ICatRegister to register your Control as using the CATID_MSOfficeAntiVirus category. That way, Office/IE can find your ActiveX Control so it can instantiate it and call its Scan() implementation. The second half of Serge's article shows you how to do that (Serge's example shows Scan() taking a PChar as input, but it actually takes a TMsoavinfo^ instead. Don't pass TMsoavinfo using a PChar).
You then have to register the resulting DLL using Windows' command-line regsvr32.exe app.
If Office/IE is not calling your Scan() implementation, then you are likely not registering your ActiveX control correctly, such as if you are not taking 32bit/64bit and/or UAC issues into account.
Just for information's sake if anyone is interested. Remy's answer is correct, however there is a small bug in the initialization section of the above mentioned example project.
Instead of
TComObjectFactory.Create(ComServer, TMsoTest, Class_MsoTest,
'MsoTest', '', ciMultiInstance, tmApartment);
The correct command is:
TMSOAVFactory.Create(ComServer, TMsoTest, Class_MsoTest,
'MsoTest', '', ciMultiInstance, tmApartment);
I read the Components Not Used in iOS Apps post in the Embarcadero DocWiki and was unable to tell if ClientDataSets and DataSources can be used in iOS applications. Can anyone confim or deny whether these components will work in iOS applications.
The first two items on the list you cite are the Data.DB and Datasnap.DBClient units, indicating that they are not supported for iOS applications. TDataSource comes from the former, while TClientDataSet comes from the latter.
To confirm for yourself, try using them in an iOS application and see whether you get the expected compiler error ("Cannot find unit %NameOfTheUnit% used by Project1").
Yes, both ClientDataSet and DataSetProvider can be used in iOS applications. The above answer is incorrect, regarding the Data and Datasnap namespaces. These units are cross-platform. You can see this if you pause your cursor over either ClientDataSet or DataSetProvider in the Tool Palette. Doing this displays the OSs supported by the component you are pausing over, and display for both of these components includes both iOS and Android.
I'm looking for a file named WinDos.PAS which is not available in Delphi XE2.
It should be an old library (I guess Delphi 1 or 2), but couldn't find anything yet...
A Google search gave this page as one of the first hits.
The functions in WinDos.pas were intended to invoke software interrupts and do various "DOS" era operating system functions. You don't need it.
All the functions in WinDos.h should be replaced with modern calls to functions in the RTL, including functions to access date and time. This unit was not dropped from XE2, or even XE, but has not been part of Delphi since version 2.0.
After removing the WinDos unit from the uses clause, as David said in a comment, you have two choices; Either implement your own helper functions, as a single line function:
function GetArgCount:Integer;
begin
result := ParamCount;
end;
Or, what would be even better, go find places where GetArgCount is called and change it to just call the modern function ParamCount. We call this "modernizing" your 16 bit era code. It's 2011. Time to update your code.
A friend of mine want to run this program on a 64bit system which gives out a failure that it can't execute it.... I thought that it was a 32bit program, but I'm not shure. is there any possibility to find this out?
If your program is compiled to use WinDos.pas, then it is a 16-bit program. Since 64-bit versions of Windows do not support 16-bit programs natively, you will have to find another way.
You could port the program from 16-bit to 32-bit, but that could be a lot of work.
Your friend could install the so-called "Windows XP Mode" which is Microsoft's supported method of running old 16-bit programs on a 64-bit operating system.
i have this problem; i need call filectrl unit in a my unit. Of course, i do: uses filectrl in interface section but it not is detected. I have tried too with system.filectrl but not found too this.
I have searched in help (online and local) but there is wrote that unit is correct. I use delphi xe2, too you have same problem? Have solved it? If yes as you done?
Thanks very much.
The full name of this unit in Delphi XE2 is:
uses VCL.FileCtrl;
The scoped name you need is Vcl.FileCtrl.
You can either use Vcl.FileCtrl, as others have already written, or you can add Vcl to the Namespace prefixes in the project options. The ellipsis button for that shows an editor for such prefixes. To be like XE, you can e.g. add System, Vcl and Winapi as prefix.
But I would only do the latter (Namespace prefixes) if I were using old code.
I'm looking for an Internet Radio player (SHOUTcast/IceCast) component for Delphi/C++Builder. Does such a thing exist? ActiveX component OK too.
Thanks.
You might try the audio library at: http://www.un4seen.com/
The "BASS" DLLs work fine with Windows Xp. They are not a delphi component of course. They are free for non-commercial use. The download includes a simple Delphi example Internet radio. There are issues that preclude its use for recording functions on some PCs where the recording function is disabled but it "plays" Internet Radio at whatever quality you require. "BASS" works very well with Delphi 2007.
Have a look at this http://symmetrica.net/newac/ it's free, comes with full source and it has a demo of a radio player.
http://code.blitzaffe.com/pages/delphi/files/streaming_radio_library_58-50 (I didn't use it, so I'm not sure if it 100% functional - if it is then update the answers).
also here you have other links:
http://www.un4seen.com/
http://www.dsplayer.de/dspweb/downloads/?view=downloads&start=5&limit=5&id=&layout=
best regards,
Radu