2 zheshiwodehao zheshiwodehao 于 2013.10.30 13:53 提问

获取ie自动保存用户名密码

IPStore接口获取IE自动保存的用户名密码(最后一句怎么修改):

//动态加载pstorec.dll,得到PStoreCreateInstance函数地址

typedef HRESULT (WINAPI tPStoreCreateInstance)(IPStore *, DWORD, DWORD, DWORD);
HMODULE hpsDLL;
hpsDLL = LoadLibrary("pstorec.dll");

tPStoreCreateInstance pPStoreCreateInstance;
pPStoreCreateInstance = (tPStoreCreateInstance)GetProcAddress(hpsDLL, "PStoreCreateInstance");

IPStorePtr PStore;
HRESULT hRes = pPStoreCreateInstance(&PStore, 0, 0, 0);

IEnumPStoreTypesPtr EnumPStoreTypes;
hRes = PStore->EnumTypes(0, 0, &EnumPStoreTypes);//指定枚举区域

if (!FAILED(hRes))
{
GUID TypeGUID;
char szItemName[512];

char szItemData[512];
char szResName[1512];
char szResData[512];
char szItemGUID[50];

//枚举密码类型
HRESULT hr=EnumPStoreTypes->raw_Next(0,&TypeGUID,0);

最后一行总出错(可以编译通过,但hr值不对),跟踪发现raw_Next()函数运行出错了,求大侠们指点,应如何改正(Win7系统)。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!