quote:
Originally posted by wincy
But debug says something like:
CallDll failed collocation of function "EstimateFileRiskLevel"...
What should i do? How should i read the result?
Thanks
The correct error you get is:
"Interop.Call failed to locate function "EstimateFileRiskLevel""
Remember it is absolutely very important to always paste errors correctly and exactly when you're seeking help. <- EDIT: sorry, it didn't occured to me you translated it yourself. It's best to post the original error, in your own language though.
Anyways, the error says it can not locate the function you are trying to execute in the library you told to seek in. In other words, you are using either the wrong name of the function, or you tell it to seek it in the wrong library, or both...
In this case, if you read the documentation on MSDN, it is both. The function name is wrong and the library is wrong:
quote:
Remarks
This function is not declared in a public header or included in a library file. To use it you must load it directly from Winshfhc.dll by ordinal 101.
So, the library is 'Winshfhc.dll', not 'Shell32.dll'.
But it also means that you can't use
Interop.Call to call this function as it does not have a public name and
Interop.Call can not work with ordinal numbers.
In other words: you can not use this Windows API in this way.