Search found 200 matches

by bingo
Wed Jun 09, 2010 6:44 am
Forum: Coding Questions
Topic: percent of the total file size (quad) ?
Replies: 7
Views: 1526

Re: percent of the total file size (quad) ?

thanks.

it works with:

Code: Select all

TotalFileSize.q
tf.d = TotalFileSize
by bingo
Tue Jun 08, 2010 9:30 am
Forum: Coding Questions
Topic: percent of the total file size (quad) ?
Replies: 7
Views: 1526

Re: percent of the total file size (quad) ?

no.

http://msdn.microsoft.com/en-us/library ... S.85).aspx

An application can use this information to display a progress bar that shows the total number of bytes copied as a percent of the total file size.

but it is not useful for big files.
by bingo
Tue Jun 08, 2010 8:48 am
Forum: Coding Questions
Topic: percent of the total file size (quad) ?
Replies: 7
Views: 1526

percent of the total file size (quad) ?

no problem with long:

Code: Select all

size.l = 99999
i.l = 999
percent.f

percent = (i/size) * 100
Debug percent  
but how can i use this with BIG quads ? :roll:

Code: Select all

size.q = 9999999999999999999
i.q = 999999999
percent.f
  
percent = (i/size) * 100
Debug percent ;?
by bingo
Mon May 31, 2010 8:36 am
Forum: Tricks 'n' Tips
Topic: WMI Reader
Replies: 8
Views: 3495

Re: WMI Reader

:D thanks from germany!
by bingo
Mon May 17, 2010 8:42 am
Forum: Windows
Topic: structure PROPVARIANT ?
Replies: 8
Views: 6819

Re: structure PROPVARIANT ?

http://com.it-berater.org/COM/structure ... ctures.htm

maybe usefull for converting this structure to pb 8)
by bingo
Sun May 16, 2010 12:55 pm
Forum: Windows
Topic: structure PROPVARIANT ?
Replies: 8
Views: 6819

Re: structure PROPVARIANT ?

but how convert this to pb-format ? :shock:
by bingo
Sat May 15, 2010 2:56 pm
Forum: Windows
Topic: structure PROPVARIANT ?
Replies: 8
Views: 6819

Re: structure PROPVARIANT ?

any "propvariant"-news ? :roll:

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

It is possible to implement propvariant in pb4.5x (like variant)? :wink:
by bingo
Thu May 13, 2010 7:19 pm
Forum: Tricks 'n' Tips
Topic: open pls with wmp (3072 bytes)
Replies: 0
Views: 1184

open pls with wmp (3072 bytes)

memsize.i = 512
membuffer.i = GlobalAlloc_(#GMEM_FIXED,memsize)

GetPrivateProfileString_("playlist","file1","",membuffer,memsize,ProgramParameter())

ShellExecute_(0,@"open",@"wmplayer.exe",membuffer,@"",#SW_MAXIMIZE)

GlobalFree_(membuffer)

End


save the pls2wmp.exe in windows\system32 and set ...
by bingo
Thu May 13, 2010 6:34 pm
Forum: Coding Questions
Topic: wimgapi.dll ##file-based disk image## (imagex.exe) with pb ?
Replies: 2
Views: 4144

Re: wimgapi.dll ##file-based disk image## (imagex.exe) with

after long time...

for friends of winpe (vista/win7) :D

my temporary code ...

Import "wimgapi.lib"
WIMCreateFile(lpszWimPath.l,dwDesiredAccess.l,dwCreationDisposition.l,dwFlagsAndAttributes.l,dwCompressionType.l,lpdwCreationResult.l)
WIMCaptureImage (hWim.l,captureDir.l,flag.l)
WIMCloseHandle ...
by bingo
Tue Feb 03, 2009 1:20 pm
Forum: Tricks 'n' Tips
Topic: extract dos image from windows ...
Replies: 5
Views: 2973

extract dos image from windows ...

no floppy to create/format boot disc ?

extract msdos.ima (for winimage or other) from windows (diskcopy.dll):

simple with pb :)

hlib.i = LoadLibrary_("diskcopy.dll")

hres.i = FindResource_(hlib,1,"BINFILE")

If CreateFile(0,"c:\tmp\msdos.ima") ;<- your dos image , use it with winimage ...
by bingo
Fri Dec 05, 2008 7:35 pm
Forum: Coding Questions
Topic: FreeMemory crash ...
Replies: 4
Views: 1387

:oops: ok ... sorry . p :shock: inter
by bingo
Fri Dec 05, 2008 7:29 pm
Forum: Coding Questions
Topic: FreeMemory crash ...
Replies: 4
Views: 1387

FreeMemory crash ...

Code: Select all

membuffer.i = AllocateMemory(500)

For i=0 To 5
any.b = PeekB(membuffer)
membuffer = membuffer + 1
Next

FreeMemory(membuffer)
End
:roll:

no error ...

Code: Select all

membuffer.i = AllocateMemory(500)

For i=0 To 5
any.b = PeekB(membuffer+i)
Next

FreeMemory(membuffer)
End
by bingo
Mon Dec 01, 2008 6:25 pm
Forum: Coding Questions
Topic: pb4.30[b4] RtlInitUnicodeString error in x64 , ok in x32
Replies: 9
Views: 2951

thanks ! but where is this documented ??? :shock:
by bingo
Mon Dec 01, 2008 4:26 pm
Forum: Coding Questions
Topic: pb4.30[b4] RtlInitUnicodeString error in x64 , ok in x32
Replies: 9
Views: 2951

pb4.30[b4] RtlInitUnicodeString error in x64 , ok in x32

Structure UNICODE_STRING
usLength.w
usMaximumLength.w
usBuffer.i
EndStructure

pu.UNICODE_STRING

Procedure Ansi2Uni(ansi.s)
SHStrDup_(@ansi,@myuni.i)
ProcedureReturn myuni
EndProcedure

testunistring.i = Ansi2Uni("test")

Debug testunistring ;ok

RtlInitUnicodeString_(@pu,testunistring ...
by bingo
Mon Nov 24, 2008 2:14 pm
Forum: Coding Questions
Topic: pb4.30[b4] x86/x64 guid/clsid structure problem
Replies: 3
Views: 1485

Procedure.l Ansi2Uni(ansi.s)
SHStrDup_(@ansi,@memtarget.i)
ProcedureReturn memtarget
EndProcedure

CLSIDFromString_(ansi2uni("{7FFFFFFF-0000-0000-0000-000000000000}"),@pf.guid)
test1.q = pf\Data1

Debug test1

Debug Hex(test1,#PB_Long)

CLSIDFromString_(ansi2uni("{8FFFFFFF-0000-0000-0000 ...