Home > Software engineering >  Help SHGetPropertyStoreForWindow
Help SHGetPropertyStoreForWindow

Time:11-30

SHGetPropertyStoreForWindow function, one of the function can access and modify system such as Windows 7 taskbar grouping related appusermodelid

C + + is as follows:
HRESULT SHGetPropertyStoreForWindow (
_In_ HWND HWND,
_In_ REFIID riid,
PPV _Out_ void * *
);
In VB how to use, if involves the class interface and a pointer, talent show, please

https://deletethis.net/dave/dev/setappusermodelid/
There is a program that, I don't understand is C or C + +
Store IPropertyStore *=NULL;
Retrieves the hr=SHGetPropertyStoreForWindow (HWND IID_PPV_ARGS (& amp; Store));
PROPVARIANT PROPVARIANT;
Hr=store - & gt; GetValue (key, & amp; PropVariant);
Hr=PropVariantToString (propVariant, value, valueSize);

CodePudding user response:

Fyi:
 Declare Function SHGetFileInfo Lib "shell32. DLL" Alias "SHGetFileInfoA" (ByVal pszPath As String, ByVal dwFileAttributes As Long, psfi As SHFILEINFO, ByVal cbFileInfo As Long, ByVal uFlags As Long) As Long 

CodePudding user response:

The progress of the
Private Type IPropertyStore
'the IUnknown
QueryInterface As Long
AddRef As Long
Release As Long
'IPropertyStore
Commit As Long
GetAt As Long
GetCount As Long
GetValue As Long
SetValue As Long
End type

Dim iid_IPropertyStore as guid
Dim inter_IPropertyStore as IPropertyStore

HRes=IIDFromString (StrPtr (" {886 d8eeb - 8 cf2-4446-8 d02 - CDBA1DBDCF99} "), iid_IPropertyStore)
The Debug. Print SHGetPropertyStoreForWindow (HWND. Me., iid_IPropertyStore, obj)
RtlMoveMemory inter_IPropertyStore_ptr, ByVal obj, 4
RtlMoveMemory inter_IPropertyStore, ByVal inter_IPropertyStore_ptr, Len (inter_IPropertyStore)

'below to call inter_IPropertyStore getvalue, need in assembly, also need to know a constant parameter of the getvalue, I don't have
Propsys. H header file,
Feeling again!

CodePudding user response:

Don't be A language code is modified to B language code busywork,
Also don't use A language code to directly invoke B language code base, this complicated things so easy to get wrong,
Just make A, B language code of input and output is redirected to A text file, or modify A, B language code let it through text file input and output,
Can easily make A, B coordination between the two languages,
For example:
A will request data written to A file a.t xt, renamed after finish aa. TXT
B find aa. TXT, read its contents, call the corresponding function, and writes the results file b.t xt, after finish delete aa. TXT, then b.t xt renamed bb. TXT
Found A bb. TXT, read the content, after finish delete bb. TXT
Above can be replaced by any kind of A language or development environment, B can be replaced by any kind of with the development of A different language or development environment,
Unless A or B does not support to determine whether A file exists, file read and write and file name,
But who can name does not support to determine whether a file exists, file read and write and file name for the development of language or development environment?
Can put the temporary files on the RamDisk efficiency decrease wear disk,
Data structure is very complex, a text file format problems refer to a json or XML

The communication methods between the temporary text file sharing this process there are plenty of advantages, compared to other method only listed below I can think of now:
Loose coupling between process,
Can be on the same machine, process, also can cross machine, across the operating system, hardware platform, and even multinational,
, convenient debugging, and monitoring, only let the third party or artificial view the temporary text files,
Switch, convenient online service, need to delete or create the temporary text files,
, is convenient to realize distributed and load balancing,
Services to provide convenient, queue, queue is full and it is almost impossible to happen (unless the hard disk space full)
DE...

"Across different languages, machine, across the operating system, hardware platform, multinational, cross *. *" misery,
Back is "the use of Shared a plain text file information communication" of the shore!
  •  Tags:  
  • API
  • Related