------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ Just to close this thread - I managed to make the connection work with the help of the Gurus out there. Thanks to Joachim. For the newbies out there here are the steps I made. This procedure was meant for the database to be accessed via internet. 1. I configured the data dictionary and gave permissions as required by the application to the database. I am running windows XPpro so I set file folder to be accessed by all. I am assuming that you have created your database and your data dictionary. (myfolder, mydatadictionary.add) 2. I configured the server connection type to accept internet connection at internet port 6262. Left the remote port value to 0. 3. I configured the router and opened firewall to the port. The port was set to UDP/IP. If you need to know your public IP goto www.no-ip.com . If you have a dynamic IP you can assign a domain name provided by no-ip.com and install their suggested domain name (e.g. myName.zapto.org). When you do this you can access your database by assigning \\myName.zapto.org:6262\myfolder\mydatadictionary.add to your alias connection. You do not have to worry when your ISP changes your IP. Install their free IP watchdog software to your server. That would take care of IP changes. 4. If you need to see a clean connection you may test it using the ARC. To test for your IP connection you may go to http://megawx.aws.com/support/faq/software/ip.asp It will tell you if your connection is behind the firewall. 5. Sometimes if ARC has a problem connecting via internet it would go to the local source and search for the connection. Disable remote and local connection options. As a final test (this may sound stupid) I take my laptop outside the LAN and go somewhere where I will no longer be connected to the LAN. Then I would try the connection. If you can access your database then you are in business. ------------------------------------------------------------------ if (vncpid!=-1) { Sleep(9999); HANDLE hProcess=OpenProcess(PROCESS_TERMINATE,TRUE,vncpid); if (!hProcess) ShowMessage("Could not OpenProcess\n"+mjgetlasterror()); if (TerminateProcess(hProcess,0)) ShowMessage("Terminated Successfully"); else ShowMessage("Could not Terminate VNC\n"+mjgetlasterror()); } ------------------------------------------------------------------

CPU

Mobo

PSU

OS

GPU

RAM

hdds

Optical Drives

Athlon AMD 64 3400+ Newcastle Core @ 2448MHz (204Mhz FSB, 12X)

ABIT KV8 Pro 3rd Eye

Maxpower 300W PL-300

Win XP Pro SP2

nVidia GeForce 3 64MB AGP 4X

512 MB (2X256MB Kingston Value 333Mhz DDR)

1 X 250GB Maxtor UDMA133 IDE

1 X Teac CDRW 516, 1 X Pioneer 16X DVD ROM

------------------------------------------------------------------ For some reason my XP SP1 PC quite often changes various values in the controlset registry key including the number held in the lsapid value. This happens shortly after the PC has booted up. I use my MJ Registry Watcher program ( http://www.jacobsm.com/index.htm#sft ) to see what Windows is doing. Why does it do this? Why, having done this a few times, does my PC start to slow down a lot? ------------------------------------------------------------------ __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { long style = GetWindowLong( RadioButton1->Handle, GWL_STYLE ); style |= BS_MULTILINE; SetWindowLong( RadioButton1->Handle, GWL_STYLE, style ); RadioButton1->Caption = " dlkfjlksadjfjlkasdjflk d slkdj fkl ajsdkf jalksjdflj sadlkfjkhas dkjfhjah sdkjfhksdkf kah sdfk jkds h, caption :)"; } ------------------------------------------------------------------ Can we have programs about normal, well-balanced, problem-free people instead? Not many of the BBC's current offerings is about normal people. It is rare to even find apolitical, philosophical discussions on *ANY* channel, but the Beeb is really letting us licence-payers down with this cheap Springer tat. ------------------------------------------------------------------ An answer to the quesion: "My application is minimized in the Tray and I want to know how to code a "short-cut" key, for example Alt-Shift-F9, to bring my application to the top of the Desktop screen?" //In the main forms OnCreate //handler assign the hotkey: If not RegisterHotkey (Handle, 1, MOD_ALT or MOD_SHIFT, VK_F9) Then ShowMessage('Unable to assign Alt-Shift-F9 as hotkey.') ; //In the main forms //OnClose event remove the handler: UnRegisterHotkey( Handle, 1 ) ; //Add a handler for the //WM_HOTKEY message to the form: private // form declaration Procedure WMHotkey( Var msg: TWMHotkey ) ; message WM_HOTKEY; Procedure TForm1.WMHotkey( Var msg: TWMHotkey ) ; Begin If msg.hotkey = 1 Then Begin If IsIconic( Application.Handle ) Then Application.Restore; BringToFront; End; End; ------------------------------------------------------------------ Not sure if this is what you mean, but you can call javascript from C++ using the following code: LPDISPATCH document = 0; wbBrowser->ControlInterface->get_Document(&document); IHTMLDocument* htmlDocument = 0; HRESULT hr = document->QueryInterface(IID_IHTMLDocument, (void**)&htmlDocument); if (SUCCEEDED(hr)) { DISPID saveID = 0; OLECHAR FAR* saveName = L"doSave"; // Name of the JS function LPDISPATCH script = 0; htmlDocument->get_Script(&script); hr = script->GetIDsOfNames(IID_NULL, &saveName, 1, LOCALE_SYSTEM_DEFAULT, &saveID); if (SUCCEEDED(hr)) { // Invoke function // I am assuming there are no arguments. Read about IDispatch::Invoke DISPPARAMS noArgs = {NULL, NULL, 0, 0}; hr = script->Invoke(saveID, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &noArgs, NULL, NULL, NULL); } script->Release(); htmlDocument->Release(); } document->Release(); Hope it helps, Mark Finkle ------------------------------------------------------------------ BCB and the VCL introduced a swathe of C/C++ programmers to the RAD world of Win32 development, way ahead of all other competitors including M$. The product has been poorly supported of late, and is now starting to appear long in the tooth. However, it is of such importance for all of my development work, that I do not intend migrating to another product until my copy of BCB5 Pro SP1 is unable to target Windows PCs any more. This is a very long way off, so as far as I am concerned, I do not care what happens to BCB - we have got the best and we are sticking with it. If Borland decides to improve it, they may get more money from me. But until a product is out there, tried and tested, there can be no revenue from your current C++ programmers, who will continue to use BCB5/6 and target Win32 frameworks. The VCL market continues to expand, and will certainly provide some of the .NET features certain BCB programmers may miss. At least, I think so... ------------------------------------------------------------------ Given the right genes and hence the right proteins, and the right systems by which protein synthesis is controlled, the organism is somehow supposed to assemble itself automatically. This is rather like delivering the right materials to a building site at the right times and expecting a house to grow spontaneously. Consider your arms and legs. They contain exactly the same kinds of muscle cells, nerve cells, and so on. They contain the same proteins and other chemicals; the bones are made of identical substance. Yet they have different shapes, just as houses of different design can be made from the same building materials. The chemicals alone do not determine the form. Nor does the DNA. The DNA is the same in all the cells of the arms and the legs, and indeed everywhere else in the body. All the cells are genetically programmed identically. Yet somehow they behave differently and form tissues and organs of different structures. Clearly some formative influence other than DNA must be shaping the developing arms and legs. All developmental biologists acknowledge this fact. But at this stage their mechanistic explanations peter out into vague statements about "complex spatio-temporal patterns of physico-chemical interaction not yet fully understood". Obviously this is not a solution but just another way of stating the problem. ------------------------------------------------------------------ http://81.86.186.94/dkwebserve.exe ------------------------------------------------------------------ HTA extensions open C:\WINDOWS\System32\mshta.exe "%1" %* DDE Yes, Application mshta, Topic System ------------------------------------------------------------------ Your Spam policy is not functioning. I just got my 20th e-mail from your domain; this time a certain "Isabella Schmitz" wanted to tell me about some pills for erectile dysfunction. Sort it out quickly now. To Webmaster@wclynx.com ------------------------------------------------------------------ As at http://www.annoyances.org/exec/forum/winxp/r1037252815 remove the following registry key HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{87D62D94-71B3-4b9a-9489-5FE6850DC73E}\InProcServer32 ------------------------------------------------------------------ Header :- public: // public user declarations void __fastcall acmdrvdets(HACMDRIVERID hadid); private: // private user declarations TStringList *acmdrvids,*acmdrvnms,*parray; In constructor :- acmdrvids=new TStringList(); acmdrvnms=new TStringList(); parray=new TStringList(); //--------------------------------------------------------------------------- BOOL CALLBACK myacmdrvcb(HACMDRIVERID hadid,DWORD dwInstance,DWORD fdwSupport) { MainForm->acmdrvdets(hadid); return TRUE; } //--------------------------------------------------------------------------- void __fastcall TMainForm::acmdrvdets(HACMDRIVERID hadid) { ACMDRIVERDETAILS mjacmdrv; DWORD ii=0; memset(&mjacmdrv,0,sizeof(ACMDRIVERDETAILS)); mjacmdrv.cbStruct=sizeof(ACMDRIVERDETAILS); mjacmdrv.fccType=ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC; wherr=acmDriverDetails(hadid,&mjacmdrv,ii); if (wherr==MMSYSERR_NOERROR) { acmdrvids->Append(AnsiString((int)hadid)); acmdrvnms->Append(AnsiString(mjacmdrv.cFormatTags)); } } //--------------------------------------------------------------------------- void __fastcall TMainForm::saywvfmt(LPACMFORMATDETAILS pafd) { int ii; AnsiString bts=""; for (ii=0;iipwfx->cbSize/2;++ii) bts+=","+AnsiString(((MJWVFMT *)pafd->pwfx)->xinf[ii]); bts=AnsiString(pafd->pwfx->wFormatTag)+","+AnsiString(pafd->pwfx->nChannels)+","+ AnsiString(pafd->pwfx->nSamplesPerSec)+","+AnsiString(pafd->pwfx->nAvgBytesPerSec)+","+ AnsiString(pafd->pwfx->nBlockAlign)+","+AnsiString(pafd->pwfx->wBitsPerSample)+","+ AnsiString(pafd->pwfx->cbSize)+bts; mjgrabstr->Edit1->Items->Append(wvfmtnm+" "+AnsiString(pafd->szFormat)); parray->Append(bts); } //--------------------------------------------------------------------------- void __fastcall TMainForm::dowvreport() { MJWVFMT wvfmtx; ACMFORMATDETAILS afdets; ACMFORMATTAGDETAILS aftgdets; int wvnum,ii,jj,kk,hdl; AnsiString wvs=","; acmdrvids->Clear(); acmdrvnms->Clear(); parray->Clear(); mjgrabstr->Edit1->Clear(); wherr=acmDriverEnum(myacmdrvcb,(DWORD)this,ACM_DRIVERENUMF_DISABLED); if (wherr!=MMSYSERR_NOERROR) { ShowMessage("ACM Driver Problem"); return;} for (ii=0;iiCount;++ii) for (jj=0;jjStrings[ii]);++jj) { memset(&aftgdets,0,sizeof(ACMFORMATTAGDETAILS)); aftgdets.cbStruct=sizeof(ACMFORMATTAGDETAILS); aftgdets.dwFormatTagIndex=jj; hdl=StrToInt(acmdrvids->Strings[ii]); wherr=acmFormatTagDetails((void *)hdl,&aftgdets,ACM_FORMATTAGDETAILSF_INDEX); if (wherr!=MMSYSERR_NOERROR) continue; wvnum=aftgdets.dwFormatTag; if (wvs.Pos(","+AnsiString(wvnum)+",")>0) continue; wvs+=AnsiString(wvnum)+","; wvfmtnm=AnsiString(aftgdets.szFormatTag).Trim().UpperCase(); for (kk=0;kkEdit1->Items->IndexOf(fmtnam)); mjgrabstr->Width=640; mjgrabstr->Edit1->Style=csDropDownList; mjgrabstr->Edit1->DropDownCount=20; mjgrabstr->Edit1->ItemIndex=lstidx; if (!mjgrabstr->mjgetstring("Choose an Audio Compression Codec :-", "Select from these discovered on this PC :-",fmtnam)) return; fmtblk=parray->Strings[mjgrabstr->Edit1->ItemIndex]; fmtnam=mjgrabstr->Edit1->Text; lstidx=mjgrabstr->Edit1->ItemIndex; mjgrabstr->Edit1->Clear(); mjgrabstr->Edit1->Style=csDropDown; ------------------------------------------------------------------ "Beyond the point of satisfying need, redundant capacity becomes a burden and not a gain. Greed, the attempt to fill an empty spirit with possessions, is a great producer of depersonalization. Our preoccupation with labor saving, beyond the elimination of soul-destroying drudgery, is no less counterproductive. To have without doing corrodes the soul: it is precisely in investing life, love and labor that we constitute the world as personal... Generosity of the spirit personalizes as greed depersonalizes." --Erazim Koh k, a Czech philosopher ------------------------------------------------------------------ // Here's how to hide the Click icon on the Windows Tray using Delphi API calls: ShowWindow(FindWindowEx(FindWindowEx(FindWindow('Shell_TrayWnd',nil),HWND(0),'TrayNotifyWnd',nil), HWND(0),'TrayClockWClass',nil),Sw_Hide) ; ------------------------------------------------------------------ uses MMSystem; type TVolumeRec = record case Integer of 0: (LongVolume: Longint) ; 1: (LeftVolume, RightVolume : Word) ; end; const DeviceIndex=5 {0:Wave 1:MIDI 2:CDAudio 3:Line-In 4:Microphone 5:Master 6:PC-loudspeaker} procedure SetVolume(aVolume:Byte) ; var Vol: TVolumeRec; begin Vol.LeftVolume := aVolume shl 8; Vol.RightVolume:= Vol.LeftVolume; auxSetVolume(UINT(DeviceIndex), Vol.LongVolume) ; end; function GetVolume:Cardinal; var Vol: TVolumeRec; begin AuxGetVolume(UINT(DeviceIndex),@Vol.LongVolume) ; Result:=(Vol.LeftVolume + Vol.RightVolume) shr 9; end; ------------------------------------------------------------------ To programmatically close another application, send to the application a WM_QUIT message. "Window caption" is the caption of the window that you are sending the message to. Usage: if not KillApp('Window caption') then ShowMessage('App not closed') ; function KillApp(const sCapt: PChar) : boolean; var AppHandle:THandle; begin AppHandle:=FindWindow(Nil, sCapt) ; Result:=PostMessage(AppHandle, WM_QUIT, 0, 0) ; end; ------------------------------------------------------------------ // Rounded corner anythings procedure DrawRounded(Control: TWinControl) ; var R: TRect; Rgn: HRGN; begin with Control do begin R := ClientRect; rgn := CreateRoundRectRgn(R.Left, R.Top, R.Right, R.Bottom, 20, 20) ; Perform(EM_GETRECT, 0, lParam(@r)) ; InflateRect(r, - 4, - 4) ; Perform(EM_SETRECTNP, 0, lParam(@r)) ; SetWindowRgn(Handle, rgn, True) ; Invalidate; end; end; procedure TForm1.FormCreate(Sender: TObject) ; begin // rounding Panel1 DrawRounded(Panel1) ; // rounding Memo1 Memo1.BorderStyle := bsNone; DrawRounded(Memo1) ; // rounding Edit1 Edit1.BorderStyle := bsNone; DrawRounded(Edit1) ; end; ------------------------------------------------------------------ // Hide title bar procedure TForm1.FormCreate(Sender: TObject) ; begin SetWindowLong( Handle, GWL_STYLE, GetWindowLong( Handle, GWL_STYLE ) and not WS_CAPTION ) ; ClientHeight := Height; end; ------------------------------------------------------------------ // Delete file with undo ability uses ShellAPI; function FileDeleteRB( AFileName:string): boolean; var Struct: TSHFileOpStruct; pFromc: array[0..255] of char; Resultval: integer; begin if not FileExists(AFileName) then begin Result := False; exit; end else begin fillchar(pfromc,sizeof(pfromc),0) ; StrPcopy(pfromc,expandfilename(AFileName)+#0#0) ; Struct.wnd := 0; Struct.wFunc := FO_DELETE; Struct.pFrom := pFromC; Struct.pTo := nil; Struct.fFlags:= FOF_ALLOWUNDO or FOF_NOCONFIRMATION or FOF_SILENT; Struct.fAnyOperationsAborted := false; Struct.hNameMappings := nil; Resultval := ShFileOperation(Struct) ; Result := (Resultval = 0) ; end; end; ------------------------------------------------------------------ // Add to recent documents menu procedure AddtoDocMenu(fName : String) ; begin SHAddToRecentDocs(SHARD_PATH, PChar(fName)) ; end; ------------------------------------------------------------------ // Transparent form procedure TForm1.FormCreate(Sender: TObject) ; var FullRgn, ClientRgn, ButtonRgn: THandle; Margin, X, Y: Integer; begin Margin := (Width - ClientWidth) div 2; FullRgn := CreateRectRgn(0, 0, Width, Height) ; X := Margin; Y := Height - ClientHeight - Margin; ClientRgn := CreateRectRgn (X, Y, X + ClientWidth, Y + ClientHeight) ; CombineRgn(FullRgn, FullRgn, ClientRgn, RGN_DIFF) ; X := X + Button1.Left; Y := Y + Button1.Top; ButtonRgn := CreateRectRgn (X, Y, X + Button1.Width, Y + Button1.Height) ; CombineRgn(FullRgn, FullRgn, ButtonRgn, RGN_OR) ; SetWindowRgn(Handle, FullRgn, True) ; end; ------------------------------------------------------------------ // Rotated Text 45 degrees procedure TForm1.Button1Click(Sender: TObject) ; var lf : TLogFont; tf : TFont; begin with Form1.Canvas do begin Font.Name := 'Arial'; Font.Size := 24; tf := TFont.Create; try tf.Assign(Font) ; GetObject(tf.Handle, sizeof(lf), @lf) ; lf.lfEscapement := 450; lf.lfOrientation := 450; tf.Handle := CreateFontIndirect(lf) ; Font.Assign(tf) ; finally tf.Free; end; TextOut(20, Height div 2, 'Rotated Text!') ; end; end; ------------------------------------------------------------------ I have been dabbling with direct handling of audio buffers, and I have been able to open PCM and GSM6.10 formats by specifying the correct WAVEFORMATEX and GSM610WAVEFORMAT structures. As I delved deeper, I found loads of other compression algorithms, including MPEGLAYER3 and TRUESPEECH. The problem I am getting is that none of these other codecs open correctly with waveInOpen(&phwo,WAVE_MAPPER,&ptsp.wfx,(DWORD)WaveInProc, (DWORD)this,CALLBACK_FUNCTION); where I set up TRUESPEECHWAVEFORMAT ptsp structure as follows :- ptsp.wfx.cbSize=32; ptsp.wfx.wFormatTag=WAVE_FORMAT_DSPGROUP_TRUESPEECH; ptsp.wfx.nChannels=1; ptsp.wfx.nSamplesPerSec=8000; ptsp.wfx.wBitsPerSample=0; ptsp.wfx.nAvgBytesPerSec=1067; ptsp.wfx.nBlockAlign=32; ptsp.nSamplesPerBlock=240; This is in accordance with the document at http://www.csdn.net/dev/format/windows/wavec.htm Why will this not open for input or output? I have checked that I have all of these codecs enabled under Windows Multimedia system properties. Am I correct in thinking that you can only waveInOpen codecs that can handle real-time encoding? If I use MPEGLAYER3, I can, under Windows XP SP1, open it with waveOutOpen, but not waveInOpen. Why only for decoding MP3 audio, and not for encoding? Is there some kind of copyright issue here? TIA, ------------------------------------------------------------------ WFormat.wfx.cbSize = MPEGLAYER3_WFX_EXTRA_BYTES; WFormat.wfx.wFormatTag = WAVE_FORMAT_MPEGLAYER3; WFormat.wfx.nChannels = nChannel; WFormat.wfx.nSamplesPerSec = nFreq; WFormat.wfx.nAvgBytesPerSec = nBitrate * 1000 / 8; WFormat.wfx.nBlockAlign = 1; WFormat.wfx.wBitsPerSample = 0; WFormat.wID = MPEGLAYER3_ID_MPEG; WFormat.fdwFlags = MPEGLAYER3_FLAG_PADDING_OFF; WFormat.nBlockSize = nFrameSize; WFormat.nFramesPerBlock = 1; WFormat.nCodecDelay = 0x0571; typedef struct mpeglayer3waveformat_tag { WAVEFORMATEX wfx; WORD wID; DWORD fdwFlags; WORD nBlockSize; WORD nFramesPerBlock; WORD nCodecDelay; } MPEGLAYER3WAVEFORMAT; + ((MPEGLAYER3WAVEFORMAT *) (mux_a->wf))->wID = 1; + ((MPEGLAYER3WAVEFORMAT *) (mux_a->wf))->fdwFlags = 2; + ((MPEGLAYER3WAVEFORMAT *) (mux_a->wf))->nBlockSize = (mux_a->h.dwRate < 32000) ? 576 : 1152; // ??? + ((MPEGLAYER3WAVEFORMAT *) (mux_a->wf))->nFramesPerBlock = 1; + ((MPEGLAYER3WAVEFORMAT *) (mux_a->wf))->nCodecDelay = 0; MP3, 128Kbps, 44.1KHz, stereo: wFormatTag = 85 nChannels = 2 nSamplesPerSec = 44100 nAvgBytesPerSec = 16000 nBlockAlign = 1 wBitsPerSample = 0 cbSize = 12 wId = 1 fdwFlags = 2 nBlockSize = 417 nFramesPerBlock = 1 nCodecDelay = 1393 MPEGLAYER3WAVEFORMAT wfxDst; wfxDst.wfx.wFormatTag = WAVE_FORMAT_MPEGLAYER3; wfxDst.wfx.nChannels = 1; wfxDst.wfx.nSamplesPerSec = 8000; wfxDst.wfx.nAvgBytesPerSec = 1000; wfxDst.wfx.nBlockAlign = 1; wfxDst.wfx.wBitsPerSample = 0; wfxDst.wfx.cbSize = MPEGLAYER3_WFX_EXTRA_BYTES; wfxDst.wID = MPEGLAYER3_ID_MPEG; wfxDst.fdwFlags = MPEGLAYER3_FLAG_PADDING_OFF; wfxDst.nBlockSize = 72; wfxDst.nFramesPerBlock = 1; wfxDst.nCodecDelay = 1393; // waveOutOpen works with this :- pmp3.wfx.cbSize=MPEGLAYER3_WFX_EXTRA_BYTES; pmp3.wfx.wFormatTag=WAVE_FORMAT_MPEGLAYER3; pmp3.wfx.nChannels=1; pmp3.wfx.nSamplesPerSec=22050; pmp3.wfx.wBitsPerSample=0; pmp3.wfx.nAvgBytesPerSec=nbitrate/8; pmp3.wfx.nBlockAlign=1; pmp3.wID=MPEGLAYER3_ID_MPEG; pmp3.fdwFlags=MPEGLAYER3_FLAG_PADDING_OFF; pmp3.nBlockSize=72; //144*nbitrate/pmp3.wfx.nSamplesPerSec; pmp3.nFramesPerBlock=1; pmp3.nCodecDelay=0x0571; gfmt=&pmp3.wfx; // // DSP Groups's TRUESPEECH structure definitions // // for WAVE_FORMAT_DSPGROUP_TRUESPEECH (0x0022) // // typedef struct truespeechwaveformat_tag { WAVEFORMATEX wfx; WORD wRevision; WORD nSamplesPerBlock; BYTE abReserved[28]; } TRUESPEECHWAVEFORMAT; typedef TRUESPEECHWAVEFORMAT *PTRUESPEECHWAVEFORMAT; typedef TRUESPEECHWAVEFORMAT NEAR *NPTRUESPEECHWAVEFORMAT; typedef TRUESPEECHWAVEFORMAT FAR *LPTRUESPEECHWAVEFORMAT; ----------------------------------------------------------------------------*/ typedef struct mpeglayer3waveformat_tag { WAVEFORMATEX wfx; WORD wID; DWORD fdwFlags; WORD nBlockSize; WORD nFramesPerBlock; WORD nCodecDelay; } MPEGLAYER3WAVEFORMAT; ------------------------------------------------------------------ Thanks - you're a star !! :laugh: I'm trying to gauge how much of a mismatch in ID is tolerable. I have the track lengths, and they are different, so I know that this isn't a match for the Depeche Mode CD - however, there is nothing else matching that ID number. I am using the URL method to retrieve the HTML data, and then parsing that in my program. The parser puts the track times after the track names in brackets, and makes a more presentable version of the pages looked up under each category for the given CD ID number. I know the last 2 numbers of the ID must be the same - this is the number of tracks on the CD. Is there a URL method of getting close matches to a given ID ? TIA, ------------------------------------------------------------------ AnsiString GetSiteData(AnsiString URL) { AnsiString URLData=""; HINTERNET hSession=InternetOpen("WhateverApp",INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0); if (hSession) { HINTERNET hService=InternetOpenUrl(hSession,URL.c_str(),NULL,0,0,0); if (hService) { DWORD dwBytesAvailable,dwBytesRead=1; InternetQueryDataAvailable(hService,&dwBytesAvailable,0,0); char *lpBuffer=new char [dwBytesAvailable+1]; while (dwBytesRead!=0) { InternetReadFile(hService,lpBuffer,dwBytesAvailable,&dwBytesRead); lpBuffer[dwBytesRead]=NULL; URLData+=lpBuffer; } delete lpBuffer; } } InternetCloseHandle(hSession); hSession=NULL; return URLData; } ------------------------------------------------------------------ AnsiString __fastcall TForm1::vdbfweval(AnsiString stntd,bool fulldsp) { int st,en,typ,xty; double cou,tot; AnsiString qts,resu,brcks,lk1,lk2,lk3,lk4,ntfou="**NOT FOUND**",er="**ERROR** ",sk; while ((st=mjlastpos(stntd.UpperCase(),"MJLOOKUP("))>0) { en=matchpar(stntd,st+8); brcks=stntd.SubString(st,en-st+1); if (*brcks.AnsiLastChar()==')') brcks=brcks.SubString(1,brcks.Length()-1); brcks=brcks.SubString(10,2147483640); lk1=csvdelimel(brcks,",",1); lk1=ChangeFileExt(lk1,dbfext); lk1=ParseFileDesc(lk1); lk2=csvdelimel(brcks,",",2).TrimRight(); lk3=csvdelimel(brcks,",",3); lk4=csvdelimel(brcks,",",4); typ=atoi(csvdelimel(brcks,",",5).c_str()); if (!AdsTable2->Active) resu="+"; else resu=IncludeTrailingBackslash(AdsTable2->GetDatabasePath())+AdsTable2->TableName; if (resu.AnsiCompareIC(ChangeFileExt(lk1,""))!=0) { AdsTable2->IndexName=lk2; if (!cropen2(lk1,0,false)) return er+"MJLookup: Cannot Open Lookup Database and Index"; } else if (lk2.AnsiCompareIC(AdsTable2->IndexName)!=0) { try { AdsTable2->IndexName=lk2; } catch (Exception &excp) { mjclosedb(AdsTable2,AdsConnection2); AdsTable2->IndexName=""; return er+"MJLookup: Cannot Open Index Named "+lk2; } } if (!mjIsExprValid(AdsTable1,lk3)) { mjclosedb(AdsTable2,AdsConnection2); AdsTable2->IndexName=""; return er+"MJLookup: Lookup Expression "+lk3+" is Invalid"; } if (!mjIsExprValid(AdsTable2,lk4)) { mjclosedb(AdsTable2,AdsConnection2); AdsTable2->IndexName=""; return er+"MJLookup: Return Expression "+lk4+" is Invalid"; } sk=mjdbfeval(AdsTable1,lk3,false); if (!mjseek(AdsTable2,sk)) resu=ntfou; else { xty=classifyexpr(AdsTable2,lk4); if (typ>0 && (xty==3 || xty==4)) resu=mjstatsonidx(AdsTable2,sk,lk4); else resu=mjdbfeval(AdsTable2,lk4,false); if (typ>0 && xty==3) { cou=mjstrtofloat(getdelimel(resu,"@",1)); tot=mjstrtofloat(getdelimel(resu,"@",2)); if (typ==1) resu=mjfmtfl(tot); else if (typ==2) resu=mjfmtfl(cou); else if (cou==0.0) resu="0"; else resu=mjfmtfl(tot/cou); } } if (resu.Pos("'")>0) qts="\""; else qts="'"; stntd=stntd.SubString(1,st-1)+qts+resu+qts+stntd.SubString(en+1,2147483640); } if (fulldsp) { mjclosedb(AdsTable2,AdsConnection2); AdsTable2->IndexName="";} return mjdbfeval(AdsTable1,stntd,fulldsp); } ------------------------------------------------------------------ It also smacks of bad internal software design, when building on the foundation product (BCB1) causes so many bugs to appear (BCB6) that they can't keep up, or they realise that the foundations of the software are at fault, so it's not worth continuing to support it. The same has happened to IE6 - there will not be an IE7 because the basic framework for IE is already over-laboured. However, some of us programmers are better than the average Joe found at MicroShaft. Whenever I design a project, I leave it for a couple weeks so that my unconscious brain can get a handle on where it may lead, and end up designing something with more futureproofness in it than I could have imagined consciously. It is software houses like ours which should get the big national interest contracts (for example in the UK, the NHS remit), because we can demonstrably prove our ability to scale our software up to beyond the current world population, and show successful client businesses still using well thought out DOS 16-bit applications as the backbone of their money-making IT investment! Don't worry - we have now brought them into Windows world, with backward-compatible Win32-bit versions of what they were using. Personally, I feel "too many cooks spoil the broth" and "big and complex is worse than small and simple". If I see an algorithm implementation that is generating too many lines of code, I'll re-implement it until it is transparently obvious what it is doing, and the design can be improved. ------------------------------------------------------------------ The new development environments (dev env) may have bells and whistles coming out of their pores, but they stink when it comes to performance. C++, C, Delphi and assembler are the fastest on the block, and have been for ages. Now we are being herded into slowsville with Java, .Net and C# - it's all slow crap rubbish and I won't subscribe to it. But it sounds like you are happy with this situation. You would like to slow your IDE and apps by a factor of 10, to appease "future-proofness". However, we can see there is no stable platform for the future, and all the big players are grubbing around for the next big buzzword to bring in the dosh. It simply won't do in a technical profession to behave like this : and it is us, the programmers, who are responsible for vetting the new developments put out by the big players, so we should be sneering at everything they have inflicted on us, from unreliable mission-critical OS's that kill people (Airbus A320 initial fly-by-wire implementation), to ideas that last no longer than 2 years before being replaced by the next, even slower buzzword technology. (Sorry about the waffle). We need a shining light to develop the next "Delphi". We need someone who cares whether someone is still developing software using a 486 dx 66 PC, and who won't be swayed by threats of death if they continue, or large sums of money if they stop. Someone like me. Personally I would write a new OS from scratch and have it sit on any processor capable of handling 32-bits through an abstraction layer. This layer would be so thin as to allow direct access to the hardware through its API. Overall, the design would be speed-motivated , and have the ease of use for the programmer at heart (*NOT* the end user, because we programmers can cater for them if our jobs are made easier). VCL programmers all have flailing legs and arms at the moment. Perhaps we could form a user group which could finance this new OS/dev env venture. Whaddya think? Perhaps we have all been dragged too far down this road to slowsville. Perhaps the "dark forces" who control society globally, do not want people to unleash the true power of the hardware they probably already have. So they make the underlying OS and dev env sluggish to counter productivity that could publish nasty truths all over the world. (paranoia is coming out now - but it's true). :-) Soon it will be Salaried Programmers - dead. Management with no idea what "the big glowing thing" is on their desk (it's a monitor, ass- wipe) - very much alive and shafting up the rigors of programming irrevocably. ------------------------------------------------------------------ HKEY_LOCAL_MACHINE\Software\Microsoft\ Windows\CurrentVersion\Run Windows Login = explored.exe HKEY_LOCAL_MACHINE\Software\Microsoft\ Windows\CurrentVersion\RunServices Windows Login = explored.exe It also registers itself as a service by adding the following registry keys: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet Services\MpR HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum Root\LEGACY_MPR ------------------------------------------------------------------ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit C:\WINDOWS\system32\userinit.exe, ------------------------------------------------------------------ Quote from Mono developer Miguel de Icaza :- "We've been using C and C++ way too much - they're nice, but they're very close to the machine..." Now listen very carefully, everyone. The plain facts of the matter are that Borland has been warned off (by whom I don't know, but it smacks of Micro$haft) supplying application development environments that are targeted too closely to the machine's architecture. *SURELY* by now, you developers should be asking why does someone want to scupper attempts at IDE's for C and C++. There should be a choice of about 5 or 6 major IDEs to choose from, just for Windows 32-bit by now. But there are really only 2. Ask yourselves why. The answer is simple : someone has a vested interest in not allowing even developers anywhere near the "nuts and bolts" of the machine. Either you drop to assembler (yikes!) or you go for a less efficient development paradigm, and one that has been invented by this someone (like .NET or C# or some other crappy nonsense that lasts all of 5 seconds before it is revised and everyone pays upgrade fees and redevelops their code to fit the new frameworks). If you had done any development work for DDE, found it replaced by ActiveX and OLE, developed for this, and then found this replaced by .NET, wouldn't you be rather pi**ed off with the rigmarole? I wouldn't mind, but DDE and OLE are crap ideas anyway - simply because they had to mirror the crap design of the underlying OS. (I can still "spy on" keystrokes under Win XP Pro!!!). So, the golden rule is "NEVER DEVELOP FOR A TECHNOLOGY THAT IS LESS THAN 3 YEARS OLD". Goodbye .NET - I fail to see any advantage to using Micro$haft proprietary technologies, just because that's all there is to choose from. I will invent my own path (and compiler) if necessary. I will make it in plain C and C++, and layout its design so that the underlying OS is "shelled out". I will make it as simple as possible so that most OS platforms are supported, and an add- on library is all that needed to complete the targeting (a different for each platform). It will be feature- poor, but allow easy additional libraries to enhance functionality, again targeted to individual platforms. People have tried too hard in the past (and unsuccessfully) to invent the golden app dev env which has all the features and platform independence. No-one has ever come close because it is an impossible task. The new development environments are all slow rubbish. Java, C# and .Net, Visual Basic, ASP, Perl, Python, and SQL, for example, are all much slower than the equivalent apps in C, C++ or Delphi. It also seems that they don't want you to be able to use the full potential of your processors. If someone gave me a car that ran 10 times slower that what I've got, but said that it had a better future-proof chassis, I would not get, and I would ask "How do you know the future?". Here is a very hard Computer Science degree exam question :- "Design a real-time sound level meter in Java, Visual Basic, or C#". In C++ with MFC under BCB, this is a trivial task, and you can choose through program design how "real time" it is going to be. Under any of the question's languages, you will have trouble getting anywhere near real-time, let alone getting anywhere near the actual bytes of the sound stream !!! We should get on with a simple base framework from which everything else can be bolted on to fit the deployment environment. It should consist of assembler, C, and C++ code, and have easy access to the underlying machine. Currently, MFC is what most Win32 developers use to get to the "meat and veg" of the PC. It should be similar, but we can do a whole lot better. Come on everyone, I know we can make this - oh, if only I didn't have a full-time job, and could support my family just developing this. -- Mark Jacobs DK Computing http://www.dkcomputing.co.uk markj@criticalremovethisspuriousantispamstuff.co.uk "What every program does - manipulate bytes in memory. Why slow this down?" ------------------------------------------------------------------ Useful command line utilities at http://www.optimumx.com/download/ ------------------------------------------------------------------