Programmer » Lucian Wischik

Here are some components, programs and documentation I have written. Most are for C++/Win32.

Utilities

Screen savers

Internet code-samples

Graphics code-samples

Win32 code-samples

Debugging

Components for Borland C++Builder

Gracias, la unica luz para poder tocar archivos OGG
Un abrazo
Guadalupe
rosario1906_28@hotmail.com
1111
it's great that you have the utility for creating avi. how about exporting the frames? do you have those?
 
thanks
 
edmondwee@hotmail.com
Nice Code :D
ni tai niu le ( in chinese pinyin ) . accesine
thank you for your DBX Utils
Hello,
do you have any version of oyur Audio Samplig Comp for DELPHI?? have any component to display an audio file waveform?
THANKS IN ADVANCE
Montxo Garcia
email to: montxo@zio-audio.com
 
Hello,
Audio Sampling compo can`t recompiled in bcb6 ? why ?
I have changed to <designintf.hpp>, still dont work?
Can u help, thank u first.~
Hi. This site has extremely informative contents. Thank you for that.
 
I was looking at your BHO code. Do you know how to intercept/get all URLS that are in a website using the BHO? Could you let me know if you know it? My email is Nicholas.G5@gmail.com
 
Thanks.
Any plans to update zip_utils to the latest zlib version 1.2.3?
hi,
 
this is extremely good that u have a helping hand
towards beginners.
 
but i have some suggestion, if u could add graphs and diagrams
to the contents then i guess u might be helping more to us.
 
thanx for the DBX util part. its amazing
and very well explained.
Thanks for map2dbg - helping us with some tricky windbg debugging involving a D2007 produced app!
Zip utils is great. Easy, clean and fast enough... Thank you
1. What is the most difficult aspect of the analog design process?
 
2. The most enjoyable?
 
3. If you could have any one tool to make your job easier, what would it be?
 
4. Are analog engineers truly different from digital engineers?
 
5. What made you choose analog design?
 
6. What applications are you working on; consumer electronics, wireless communication, networking, power management, etc., etc.?
 
7. What process technology are you working in?
 
8. If you have been doing analog for a while, do you think thetools have gotten better or stayed the same?
 
9. Do shrinking processes make analog design more difficult?
 
10. What part of your job do you wish you could hand off to someone else to do?
 
11. How does it feel to get working silicon back for a new design? Is that the buzz that keeps you doing this, or if not, what is?
 
12. Do you worry about digital taking over?
 
13. Do your designs represent just one (critical) part of a mostly digital chip?
 
14. How do you interface to the digital engineers?
 
15. Do you work in digital as well; use programming or modeling languages: Verilog, Verilog-AMS, etc.?
 
Subscribe for daily updates. href="http://techdockets.com"
 
June - 15 - 2009
Thank you for sharing your HZIP source with the world. I am using the Unzip part in Windows CE 6.0 R2 and it works real fine.
Keep up the good work!
Thanks and Best regards,
Dirk van Boxel
www.boxel.nl
very nice..............
hello, please help me
how to export data(String,int,...) to microsoft excel with c++ builder and with password to open that file
November 16, 2009
I need to add a GPS Coordinate to the capture of a video. I need to place it in somewhat like the Date/Time stamp is entered. This needs to be done real time and not post production.
thanks for any suggestions.
Michael
aclv@comcast.net
Genious.... thanks.
 
Eugene
Minor enhancements to the ZIP utilities.
Listed above as 'Internet code-samples'
 
I did this mainly to do a per-file-progress bar, however
to see this progress bar, you need to call the progress
function in a loop in the main app thread, while the
zipping function is taking place in a separate thread.
 
1.Added
void ZipSetCompression(HZIP hz, int level)
{
 TZipHandleData *han = (TZipHandleData*)hz;
 han->zip->compressionlevel=level;
}
 
2. Added
unsigned int ZipProgress(HZIP hz)
{
 TZipHandleData *han = (TZipHandleData*)hz;
 return han->zip->readsofar;
}
 
3. Added these in class TZip
  unsigned readsofar;
  unsigned compressionlevel;
 
4. I added readsofar here.....
  hfout = CreateFile(fn,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
  readsofar=0;
  if (hfout==INVALID_HANDLE_VALUE) {hfout=0; return ZR_NOFILE;}
  ....
  in TZip::Create
 
5. I added readsofar here....
  HANDLE hf = CreateFile(fn,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,0,NULL);
  readsofar=0;
  if (hf==INVALID_HANDLE_VALUE)
  ....
  in TZip::open_file
 
6. I added readsofar here...
  ......
  BOOL ok = ReadFile(hfin,buf,size,&red,NULL);
  if (!ok) return 0;
  ired += red;
  readsofar+=red;
  crc = crc32(crc, (uch*)buf, red);
  ......
  in unsigned TZip::read(char *buf, unsigned size)
 
I did this because I had an app zipping large files but the tech though it locked up. Apparently there were 2 issues 1. The compression was set to high - i.e. it was taking very long 2. There was no progress bar in the application - so no apparent response for a long time. Now I have a GUI that shows a per-file progress and an all-file progress.
 
Colin B Maharaj
 

 

Great man, your code help me a lot!!!!!!!!!!!!!!!
http://www.wischik.com/lu/programmer/
Hi,
 
First of all thank you verymuch for these code examples.
I am executed CreatAVI example.
 
Here it works fine for 2 channel audio. I am trying to modify it for multichannel. but the final avi is not having any audio.
Can you please help me what's the wrong.
 

I Modified the WAV structure as
typedef struct
{ char id[4]; //="fmt "
  unsigned long size; //=16
  short wFormatTag; //=WAVE_FORMAT_PCM=1
  unsigned short wChannels; //=1 or 2 for mono or stereo
  unsigned long dwSamplesPerSec; //=11025 or 22050 or 44100
  unsigned long dwAvgBytesPerSec; //=wBlockAlign * dwSamplesPerSec
  unsigned short wBlockAlign; //=wChannels * (wBitsPerSample==8?1:2)
  unsigned short wBitsPerSample; //=8 or 16, for bits per sample
  unsigned short cbSize;
  unsigned short wValidBitsPerSample;
  unsigned short dwChannelMask;
  unsigned short SubFormat;
} FmtChunk;
 
Remaining structure are same.
 
and ADDWAV function as
 
HRESULT AddAviWav(HAVI avi, LPCWSTR src, DWORD flags)
{ if (avi==NULL) return AVIERR_BADHANDLE;
  if (flags!=SND_MEMORY && flags!=SND_FILENAME)
return AVIERR_BADFLAGS;
  if (src==0)
return AVIERR_BADPARAM;
  TAviUtil *au = (TAviUtil*)avi;
  if (au->iserr)
return AVIERR_ERROR;
  // MessageBox(src);
  char *buf=0; WavChunk *wav = (WavChunk*)src;
  if (flags==SND_FILENAME)
  {
HANDLE hf=CreateFile(src,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,0,NULL);
  if (hf==INVALID_HANDLE_VALUE)
{au->iserr=true; return AVIERR_FILEOPEN;}
  DWORD size = GetFileSize(hf,NULL);
  buf = new char[size];
  DWORD red; ReadFile(hf,buf,size,&red,NULL);
  CloseHandle(hf);
  wav = (WavChunk*)buf;
  }
  //
  // check that format doesn't clash
  bool badformat=false;
  if (au->wfx.Format.nChannels==0)
  { au->wfx.Format.wFormatTag=WAVE_FORMAT_EXTENSIBLE;;//wav->fmt.wFormatTag;
au->wfx.Format.cbSize=0;
  au->wfx.Format.nAvgBytesPerSec=wav->fmt.dwAvgBytesPerSec;
  au->wfx.Format.nBlockAlign=wav->fmt.wBlockAlign;
  au->wfx.Format.nChannels=wav->fmt.wChannels;
  au->wfx.Format.nSamplesPerSec=wav->fmt.dwSamplesPerSec;;//48000L;//wav->fmt.dwSamplesPerSec;
  au->wfx.Format.wBitsPerSample=wav->fmt.wBitsPerSample;;//24;//wav->fmt.wBitsPerSample;
au->wfx.dwChannelMask=SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT;
 
au->wfx.SubFormat=KSDATAFORMAT_SUBTYPE_PCM;;
au->wfx.Format.nAvgBytesPerSec=864000L;
au->wfx.Format.wBitsPerSample=(8*wav->fmt.wBlockAlign/wav->fmt.wChannels);
  }
  else
  { if (au->wfx.Format.wFormatTag!=wav->fmt.wFormatTag) badformat=true;
  if (au->wfx.Format.nAvgBytesPerSec!=wav->fmt.dwAvgBytesPerSec) badformat=true;
  if (au->wfx.Format.nBlockAlign!=wav->fmt.wBlockAlign) badformat=true;
  if (au->wfx.Format.nChannels!=wav->fmt.wChannels) badformat=true;
  if (au->wfx.Format.nSamplesPerSec!=wav->fmt.dwSamplesPerSec) badformat=true;
  if (au->wfx.Format.wBitsPerSample!=wav->fmt.wBitsPerSample) badformat=true;
  }
  if (badformat)
  {
if (buf!=0)
delete[] buf;
return AVIERR_BADFORMAT;
  }
  //
 
  if (au->as==0) // create the stream if necessary
  { AVISTREAMINFO ahdr; ZeroMemory(&ahdr,sizeof(ahdr));
  ahdr.fccType=streamtypeAUDIO;
  ahdr.dwScale=au->wfx.Format.nBlockAlign;
  ahdr.dwRate=au->wfx.Format.nSamplesPerSec*au->wfx.Format.nBlockAlign;
  ahdr.dwSampleSize=au->wfx.Format.nBlockAlign;
  ahdr.dwQuality=(DWORD)-1;
  HRESULT hr = AVIFileCreateStream(au->pfile, &au->as, &ahdr);
  if (hr!=AVIERR_OK) {if (buf!=0) delete[] buf; au->iserr=true; return hr;}
  hr = AVIStreamSetFormat(au->as,0,&au->wfx,sizeof(WAVEFORMATPCMEX));
  if (hr!=AVIERR_OK) {if (buf!=0) delete[] buf; au->iserr=true; return hr;}
  }
  //
  // now we can write the data
  unsigned long numbytes = wav->dat.size;
  unsigned long numsamps = numbytes*8 / au->wfx.Format.wBitsPerSample;
  HRESULT hr = AVIStreamWrite(au->as,au->nsamp,numsamps,wav->dat.data,numbytes,0,NULL,NULL);
  if (buf!=0) delete[] buf;
  if (hr!=AVIERR_OK) {au->iserr=true; return hr;}
  au->nsamp+=numsamps; return S_OK;
}
 
Can you please help me where is the mistake.
 
Thanks in advance
ANKIREDDY.
Hi,
 
Thanks for the zip utils code. Really helpful !!!
have a small query in the program. If i have a zip file within a zip file with password enabled, it corrupts d zip file.
eg: in Main.zip, if we have a.zip and b.xml.Main.zip is password protected.
If we unzip Main.zip giving d password , the extracted a.zip is corrupted whereas b.xml is fine.
 
BUT, if we have Main.zip with no password, it works fine.
 
Is this unzipping possible with the present code.
 
Any help is appreciated.
 
Thanks...
I am interesting in BHO, your code help me a lot,thx!
add comment  edit commentPlease add comments here