Search found 53 matches

by supercdfr
Mon Sep 18, 2017 1:27 pm
Forum: Coding Questions
Topic: get version off dll
Replies: 2
Views: 1524

get version off dll

hello,

i find some old way to have the version of dll or exe :

http://www.purebasic.fr/english/viewtopic.php?t=11985&p=66018
;- get version of specified file as string
Procedure.s GetFileVersion(FileSpec.s)


VerBuffer.VS_FIXEDFILEINFO

FileVersion.s

If OpenLibrary(0, "version.dll")
*GFI ...
by supercdfr
Tue Dec 06, 2016 11:41 pm
Forum: Coding Questions
Topic: am i crazy ???
Replies: 9
Views: 3552

Re: am i crazy ???

in fact, it works for my program the first time, not 2-3 times consecutivly.

Anyone know if there is another way to have acces wmi in PB ?
by supercdfr
Tue Dec 06, 2016 6:26 pm
Forum: Coding Questions
Topic: am i crazy ???
Replies: 9
Views: 3552

Re: am i crazy ???

find a solution with this :

Code: Select all

    CoUninitialize_()
    CoInit = CoInitializeEx_(0, #COINIT_APARTMENTTHREADED | #COINIT_DISABLE_OLE1DDE)
it works like that, but may be not the good way to do it.
by supercdfr
Tue Dec 06, 2016 6:20 pm
Forum: Coding Questions
Topic: am i crazy ???
Replies: 9
Views: 3552

Re: am i crazy ???

i just try your code with this at the end

;List only the "Caption" and "OSArchitecture" Properties from the "Win32_OperatingSystem" Class
Debug WMI("SELECT Caption, OSArchitecture FROM Win32_OperatingSystem")
Debug "****"
;List all Properties (*) from the "Win32_OperatingSystem" Class
Debug WMI ...
by supercdfr
Fri Dec 02, 2016 7:20 pm
Forum: Coding Questions
Topic: am i crazy ???
Replies: 9
Views: 3552

am i crazy ???

here is a code to get the manufacturer of my pc :

DataSection
CLSID_WbemAdministrativeLocator:
Data.l $CB8555CC
Data.w $9128
Data.w $11D1
Data.b $AD, $9B, $0, $C0, $4F, $D8, $FD, $FF
IID_IWbemLocator:
Data.l $DC12A687
Data.w $737F
Data.w $11CF
Data.b $88, $4D, $0, $AA, $0, $4B, $2E, $24 ...
by supercdfr
Wed Oct 26, 2016 3:44 pm
Forum: Coding Questions
Topic: get camera ip stream
Replies: 4
Views: 2244

Re: get camera ip stream

unfortunately, cvopen doesn't work with this type of adress.
by supercdfr
Tue Oct 25, 2016 2:39 pm
Forum: Coding Questions
Topic: get camera ip stream
Replies: 4
Views: 2244

get camera ip stream

hello,

i have my camera ip web adress like this : http://xx.xx.xx.xx:1023/videostream.cgi ... &pwd=guest

I want to retrieve the stream, but i don't find any samples that can help.

thanks in advance.
by supercdfr
Wed Oct 12, 2016 3:48 pm
Forum: Coding Questions
Topic: bit swap from c to PB
Replies: 4
Views: 1801

Re: bit swap from c to PB

1000 thanks :)
by supercdfr
Wed Oct 12, 2016 3:04 pm
Forum: Coding Questions
Topic: bit swap from c to PB
Replies: 4
Views: 1801

bit swap from c to PB

i have this in c :
printf("%u\n\n\n",(3967115105 << 28) | (3967115105 >> 4) )
And i have the result : 516380150 that is correct

When i try whit PB, i have this :
Debug (3967115105 << 28) | (3967115105 >> 4)
i have 1064914352463107574 that is incorrect.

I try stru, strd strf, but the result is ...
by supercdfr
Thu Sep 08, 2016 2:20 pm
Forum: Coding Questions
Topic: [SOLVED] ping and unicode
Replies: 2
Views: 1694

Re: ping and unicode

foind this solution :

Procedure.q lngNewAddress(strAdd.s)
Protected sDummy.s=strAdd
Protected Position = FindString(sDummy, ".",1)
If Position>0
Protected a1=Val(Left(sDummy,Position-1))
sDummy=Right(sDummy,Len(sDummy)-Position)
Position = FindString(sDummy, ".",1)
If Position>0
Protected ...
by supercdfr
Thu Sep 08, 2016 2:00 pm
Forum: Coding Questions
Topic: [SOLVED] ping and unicode
Replies: 2
Views: 1694

[SOLVED] ping and unicode

I have this code :

InitNetwork()

Global EchoMessage.s = "MVPing make a Ping Test"

Procedure Ping(valeur)
Protected sIPAddress.s
Protected IPAddress.l
Protected lngResult.l

Repeat
sIPAddress = GetGadgetText(3)

ReplyBuffer.s = Space(SizeOf(ICMP_ECHO_REPLY) + Len(EchoMessage))
hIcmpFile ...
by supercdfr
Thu Jun 23, 2016 6:32 pm
Forum: Announcement
Topic: PureBasic 5.50 final is out !
Replies: 132
Views: 75692

Re: PureBasic 5.50 beta 1 is out



Encoded$ = "aGVsbG8gd29ybGQ="

*encodebuffer = AllocateMemory(StringByteLength(Encoded$))
If *encodebuffer
PokeS(*encodebuffer, Encoded$, -1, #PB_Ascii|#PB_String_NoZero)
*outbuffer = AllocateMemory(MemorySize(*encodebuffer) * 0.8)
If *outbuffer
Length = Base64Decoder(*encodebuffer ...
by supercdfr
Wed Jun 22, 2016 6:21 pm
Forum: Announcement
Topic: PureBasic 5.50 final is out !
Replies: 132
Views: 75692

Re: PureBasic 5.50 beta 1 is out

Code: Select all

  Decoded$ = Space(1024) 
  Encoded$ = "aGVsbG8gd29ybGQ="

  Debug Base64Decoder(@Encoded$, StringByteLength(Encoded$), @Decoded$, 1024)
  Debug Decoded$
No unicode -> HELLO WORLD
unicode -> chinese, and i don't speak chinese. :?

And it come from official base64.
by supercdfr
Wed Jun 15, 2016 1:35 pm
Forum: Coding Questions
Topic: big probleme between str and val
Replies: 3
Views: 1543

big probleme between str and val

here is a little code :

retour$ = "25.8"
retour_1$ = "3"
Debug ValF( retour$ )
Debug ValD( retour$ )

Debug ValF( retour$ ) / ValF( retour_1$ )
Debug ValD( retour$ ) / ValD( retour_1$ )


When i execute, i have to obtain has result 8.60
Here, i have 8.5999999999999996

how to make it working ...
by supercdfr
Thu May 19, 2016 11:22 am
Forum: Coding Questions
Topic: big problem with services and opendatabase
Replies: 7
Views: 1597

Re: big problem with services and opendatabase

i just try to make a service in C# that just run a exe in PB with this code :
EnableExplicit

Enumeration
#database
EndEnumeration

Define result

UseODBCDatabase()
result = OpenDatabase(#database, "test", "sa", "sa", #PB_Database_ODBC)
MessaeRequester("",str(result) )
All i obtain is that the ...