Search found 89 matches

by PureGuy
Wed Nov 26, 2014 3:57 pm
Forum: Tricks 'n' Tips
Topic: cpuinfo module
Replies: 22
Views: 11086

Re: cpuinfo module

wilbert wrote: Does it make a difference if the entire IsCPU procedure is ASM instead of a part of it ?
Yes, using your asm procedure returns correct for both compiler :D
by PureGuy
Wed Nov 26, 2014 2:13 pm
Forum: Tricks 'n' Tips
Topic: cpuinfo module
Replies: 22
Views: 11086

Re: cpuinfo module

Thanks, but I get wrong results for x64 compiled

x86 - PB 5.24
1
1
1
1
1
1
0
0
Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz
GenuineIntel
4
x64 - PB 5.24
1
1
1
0
0
0
0
0
Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz
GenuineIntel
4
by PureGuy
Wed Nov 19, 2014 7:58 pm
Forum: Feature Requests and Wishlists
Topic: Ignore string parameter type for external functions
Replies: 3
Views: 1782

Re: Ignore string parameter type for external functions

You missing the point.
The external function does not care if PB call it string, it just get the address in both cases.

The compiler should understand that and ignore this "error" by just send the address.
by PureGuy
Wed Nov 19, 2014 7:09 pm
Forum: Feature Requests and Wishlists
Topic: Ignore string parameter type for external functions
Replies: 3
Views: 1782

Ignore string parameter type for external functions

Default included Win32 API accept both variable types pointers or PB's strings variables. But it's not possible to declare imports of prototypes that way. MessageBox_(0, @"Text", @"Caption" , 0) ; works MessageBox_(0, "Text", "Caption" , 0) ; works Import &quo...
by PureGuy
Sat Nov 15, 2014 3:29 pm
Forum: General Discussion
Topic: Detecting a window that is "Not Responding"
Replies: 4
Views: 2776

Re: Detecting a window that is "Not Responding"

There is a API called IsHungAppWindow(). Not tested, but it should work this way: Prototype pIsHungAppWindow(hwnd) yourhwnd = FindWindow_(0, "title") OpenLibrary(0, "user32.dll") IsHungAppWindow_.pIsHungAppWindow = GetFunction(0, "IsHungAppWindow") Debug IsHungAppWindow...
by PureGuy
Thu Nov 06, 2014 8:20 pm
Forum: General Discussion
Topic: Does RunProgram work on Windows 8 and 8.1?
Replies: 8
Views: 3440

Re: Does RunProgram work on Windows 8 and 8.1?

This is the file redirection on x64 Windows.

You can read here about: File System Redirector
by PureGuy
Thu Nov 06, 2014 7:55 pm
Forum: General Discussion
Topic: Does RunProgram work on Windows 8 and 8.1?
Replies: 8
Views: 3440

Re: Does RunProgram work on Windows 8 and 8.1?

Is there a nslookup.exe in side your C:\Windows\syswow64 folder ?

If Not try to run native version:

Compilertrdns = RunProgram("C:\Windows\Sysnative\nslookup.exe", ..
by PureGuy
Sat Sep 13, 2014 12:56 pm
Forum: Coding Questions
Topic: [Solved] Byte array oddity (or I'm misunderstanding sthg)
Replies: 3
Views: 1459

Re: Byte array oddity (or I'm misunderstanding something)

You need to tell Hex() how to interpret.

Code: Select all

Dim BA.b(255)   ;  create byte array of size 255

BA(1)='r'
BA(2)='o'
BA(3)=$90
BA(4)=$72

Debug Hex(BA(1), #PB_Byte)  +  " " + Hex(BA(2), #PB_Byte) + " " + Hex(BA(3), #PB_Byte) + " " + Hex(BA(4), #PB_Byte)
by PureGuy
Thu Jul 24, 2014 10:01 am
Forum: Windows
Topic: VSS - Procedure stack corruption [resolved]
Replies: 8
Views: 4545

Re: VSS - Procedure stack corruption

XP has a different Interface, you will need to convert it from the older SDK.
For the CreateVssBackupComponentsInternal call try this:

Code: Select all

CreateVssBackupComponents_.pCreateVssBackupComponents = GetFunction(vss_lib, "?CreateVssBackupComponents@@YGJPAPAVIVssBackupComponents@@@Z")
by PureGuy
Mon Jun 16, 2014 1:44 pm
Forum: Windows
Topic: VSS - Procedure stack corruption [resolved]
Replies: 8
Views: 4545

Re: VSS - Procedure stack corruption

I have updated the code, it should work now for both interpreters.

Keep in mind this creates permanent shadows, if you don't delete them in your code, you have to do it manually with:

vssadmin delete shadows /For=C:
by PureGuy
Mon Jun 16, 2014 1:41 pm
Forum: Coding Questions
Topic: COM Interface
Replies: 2
Views: 820

Re: COM Interface

Thanks for the fast answer.

Yes, it seems using 2 quad is working :D
by PureGuy
Mon Jun 16, 2014 11:23 am
Forum: Coding Questions
Topic: COM Interface
Replies: 2
Views: 820

COM Interface

As noticed in my other topic: http://www.purebasic.fr/english/viewtopic.php?f=5&t=59640 There is something weird with passing parameters to COM objects via interfaces. HRESULT AddToSnapshotSet( [in] VSS_PWSZ pwszVolumeName, [in] VSS_ID ProviderId, [out] VSS_ID *pidSnapshot ); How comes that C ca...
by PureGuy
Mon Jun 16, 2014 11:07 am
Forum: Windows
Topic: VSS - Procedure stack corruption [resolved]
Replies: 8
Views: 4545

Re: VSS - Procedure stack corruption

Thanks you Sundance! HRESULT AddToSnapshotSet( [in] VSS_PWSZ pwszVolumeName, [in] VSS_ID ProviderId, [out] VSS_ID *pidSnapshot ); "AddToSnapshotSet hresult(wstr; uint64; uint64; ptr);" That's works for AddToSnapshotSet() but it's even more confusing. Mabye you can ask this Lars about GetSn...
by PureGuy
Sat Jun 14, 2014 10:08 am
Forum: Windows
Topic: VSS - Procedure stack corruption [resolved]
Replies: 8
Views: 4545

VSS - Procedure stack corruption [resolved]

Hi, I'm using the following code to create a volume shadow copy and it worked great on my Windows 7 x64. Now I wanted to use it on a 32-bit windows 7 machine , but Purifier breaks with "Procedure stack corruption" It always happens on the AddToSnapshotSet() call. I'm really have no idea wh...