question

xinbozhang-8450 avatar image
0 Votes"
xinbozhang-8450 asked RLWA32-6355 commented

how can i find sti.h?thank you.

i need sti.h where can i find it? thank.

codes below:

/
函数名:
输 入:
a---
b---
c---
输 出: x---
x 为 1, 表示...
x 为 0, 表示...
功能描述:



全局变量:
调用模块:
作 者:
日 期:
版 本


修 改:
日 期:
版 本
***/

DWORD dword_12533A8 = 0;
int sti_dll()
{
//
HMODULE LoadSTI_DLL();
//
int iRet = TRUE;

 HMODULE hModule = LoadSTI_DLL();

 //
 //typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT);

define In

 #define _Out_

 typedef HRESULT (CALLBACK* LPF_StiCreateInstance)(_In_  HINSTANCE hinst,

In DWORD dwVer,
Out PSTI *ppSti,
In LPUNKNOWN punkOuter);

if 0

 HRESULT StiCreateInstance(

In HINSTANCE hinst,
In DWORD dwVer,
Out PSTI *ppSti,
In LPUNKNOWN punkOuter
);

endif


 LPF_StiCreateInstance fProc_StiCreateInstance = GetProcAddress(hModule,"StiCreateInstance");

 //
 HMODULE hFile_CreateProcess = 0;
 if(fProc_StiCreateInstance)
 {
     hFile_CreateProcess = GetModuleHandle(0);
        
     iRet = fProc_StiCreateInstance(hFile_CreateProcess,
         0,
         2,
         (LPUNKNOWN)&dword_12533A8);
 }

 return iRet;

}

--------------------Configuration: ExeInit - Win32 Debug--------------------
Compiling...
InitSub0.cpp
E:_temp\PhotoLab\codes\SubPrjsCodes\ExeInit\InitSub0\InitSub0.cpp(50) : fatal error C1083: Cannot open include file: 'sti.h': No such file or directory

vs-debugging
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered RLWA32-6355 edited

In my Windows 10 20H2 system with VS2019 Community 16.10.4 installed the Sti.h header file is located in the folder - C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um -- where 10.0.19041.0 is the version number of the installed Windows 10 SDK being used.

Ordinarily, the installation of Visual Studio will properly set the paths used by the compiler to find header files when building within the IDE. For example, the property page for a project that shows the paths used for VC++ Directories looks like this -
118665-vcdirectories.png

If you click on the settings for Include Directories and select "Edit" another dialog opens that displays the actual file system paths that the compiler will search. For example,
118721-includes.png

Note that the path containing sti.h is present by default.



vcdirectories.png (44.5 KiB)
includes.png (16.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

xinbozhang-8450 avatar image
0 Votes"
xinbozhang-8450 answered RLWA32-6355 commented

thank you.
i use vc6 in os win10 cpu64.i searched vc installed path. not find.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Why are you using VC6 in 2021?

0 Votes 0 ·
xinbozhang-8450 avatar image
0 Votes"
xinbozhang-8450 answered xinbozhang-8450 published

please tell me the data structure IStillImage,PSTD,so i can program .

sub_BE8810 proc near ; CODE XREF: WinMain(x,x,x,x)+2C↑p
.text:00BE8810
.text:00BE8810 Filename= byte ptr -334h
.text:00BE8810 WideCharStr= word ptr -20Ch
.text:00BE8810
.text:00BE8810 mov eax, dword_12533A8 ;
.text:00BE8810 ;
.text:00BE8810 ;
.text:00BE8810 ;
.text:00BE8815 sub esp, 334h ;
.text:00BE8815 ;
.text:00BE8815 ;
.text:00BE8815 ;

.text:00BE881B push esi
.text:00BE881C push edi ;
.text:00BE881C ;
.text:00BE881C ;
.text:00BE881C ;
.text:00BE881D xor edi, edi ;
.text:00BE881D ;
.text:00BE881D ;
.text:00BE881D ;

.text:00BE881F cmp eax, edi
.text:00BE8821 jnz loc_BE88E3 ;
.text:00BE8821 ;
.text:00BE8821 ;
.text:00BE8821 ;
.text:00BE8827 push offset aStiDll ; "STI.DLL"
.text:00BE882C mov dword_1250540, edi
.text:00BE8832 mov word_1250544, di
.text:00BE8839 mov word_1250644, di
.text:00BE8840 mov [esp+340h+WideCharStr], di
.text:00BE8848 call sub_6067C0 ; 1个参数
.text:00BE8848 ; 00进去干啥?
.text:00BE8848 ; 活动上下文,加载sti.dll
.text:00BE8848 ;
.text:00BE8848 ;

.text:00BE884D cmp eax, edi ; eax:loadlibrary hmodule
.text:00BE884D ;
.text:00BE884D ;
.text:00BE884D ;
.text:00BE884F jz loc_BE88E3 ;
.text:00BE884F ;
.text:00BE884F ;
.text:00BE884F ;

.text:00BE8855 push offset aSticreateinsta ; "StiCreateInstance"
.text:00BE885A push eax ; hModule
.text:00BE885B call ds:GetProcAddress
.text:00BE8861 mov esi, eax
.text:00BE8863 cmp esi, edi
.text:00BE8865 jz short loc_BE88E3
.text:00BE8867 push edi
.text:00BE8868 push offset dword_12533A8
.text:00BE886D push 2 ;
.text:00BE886D ;
.text:00BE886D ;
.text:00BE886D ;
.text:00BE886F push edi ; lpModuleName
.text:00BE8870 call ds:GetModuleHandleA ; 1个参数
.text:00BE8870 ;
.text:00BE8870 ;
.text:00BE8870 ;

.text:00BE8876 push eax
.text:00BE8877 call esi ; 4个参数 sti_createinstance
.text:00BE8877 ;
.text:00BE8877 ;
.text:00BE8877 ;
.text:00BE8879 test eax, eax
.text:00BE887B jl short loc_BE88DD ;
.text:00BE887B ;
.text:00BE887B ;
.text:00BE887B ;

.text:00BE887D cmp dword_12533A8, edi
.text:00BE8883 jz short loc_BE88DD ;
.text:00BE8883 ;
.text:00BE8883 ;
.text:00BE8883 ;
.text:00BE8885 lea eax, [esp+33Ch+Filename]
.text:00BE8889 push 125h ; nSize
.text:00BE888E push eax ; lpFilename
.text:00BE888F push edi ; hModule
.text:00BE8890 call ds:GetModuleFileNameA
.text:00BE8896 test eax, eax
.text:00BE8898 jz short loc_BE88DD ;
.text:00BE8898 ;
.text:00BE8898 ;
.text:00BE8898 ;

.text:00BE889A lea ecx, [esp+33Ch+WideCharStr]
.text:00BE88A1 push 20Ah ; cchWideChar
.text:00BE88A6 push ecx ; lpWideCharStr
.text:00BE88A7 lea edx, [esp+344h+Filename]
.text:00BE88AB push 0FFFFFFFFh ; cbMultiByte
.text:00BE88AD push edx ; lpMultiByteStr
.text:00BE88AE push edi ; dwFlags
.text:00BE88AF push edi ; CodePage
.text:00BE88B0 call ds:MultiByteToWideChar ;
.text:00BE88B0 ;
.text:00BE88B0 ;
.text:00BE88B0 ;
.text:00BE88B6 test eax, eax
.text:00BE88B8 jz short loc_BE88DD ;
.text:00BE88B8 ;
.text:00BE88B8 ;
.text:00BE88B8 ;

.text:00BE88BA mov eax, dword_12533A8 ; IStillImage Point
.text:00BE88BA ;
.text:00BE88BA ;
.text:00BE88BA ;
.text:00BE88BF lea edx, [esp+33Ch+WideCharStr]
.text:00BE88C6 push edx
.text:00BE88C7 push offset off_11E2294
.text:00BE88CC mov ecx, [eax]
.text:00BE88CE push eax
.text:00BE88CF call dword ptr [ecx+28h] ; 3个参数
.text:00BE88CF ;
.text:00BE88CF ;
.text:00BE88CF ;
.text:00BE88CF ;

.text:00BE88D2 cmp eax, 80070005h
.text:00BE88D7 jz short loc_BE88E3
.text:00BE88D9 cmp eax, edi
.text:00BE88DB jge short loc_BE88E3
.text:00BE88DD
.text:00BE88DD loc_BE88DD: ; CODE XREF: sub_BE8810+6B↑j
.text:00BE88DD ; sub_BE8810+73↑j ...
.text:00BE88DD mov dword_12533A8, edi
.text:00BE88E3
.text:00BE88E3 loc_BE88E3: ; CODE XREF: sub_BE8810+11↑j
.text:00BE88E3 ; sub_BE8810+3F↑j ...
.text:00BE88E3 pop edi
.text:00BE88E4 pop esi
.text:00BE88E5 add esp, 334h
.text:00BE88EB retn
.text:00BE88EB sub_BE8810 endp
.text:00BE88EB
.text:00BE88EB ; ---------------------------------------------------------------------------
.text:00BE88EC

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Castorix31 avatar image
0 Votes"
Castorix31 answered

I have it in any SDK version I kept
So, you can install the latest Windows 10 SDK : Windows 10 SDK
(with Installer or ISO)


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.