|
Hi, thanks for your answer. I'm using:
AddressOf SampleSub
Also OllyDbg gives me that address.
|
|
|
|
|
I would experiment with calling other VB6 functions to see if they give the same result. Especially try calling a function that takes no parameters to see if the problem might be the parameter passing.
Have you ever had success calling a VB6 function from C?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
I'm afraid I don't know what it could be. However, I had always believed that it was not possible to arbitrarily call into a VB6 executable.
I was under the impression that the old VB worked on a, sort of, virtual execution scheme, and the VB program was under the control of a supervisor thread.
I wish I could be more helpful!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Ok thank you very much, I'll keep trying and tell you if I could make the trick. If anybody have any idea please tell me!!
Thanks again!
|
|
|
|
|
|
Hi Randor, thank you very much for your reply. I'm actually just using a VB6 "function" with no return value and that takes no parameters. This one:
Public Sub SampleSub()
MsgBox "Hello world!"
End Sub
With the typedef void (__stdcall *SampleSubPtr)(void); prototype. What should I use instead of void ? I think it will be better to start calling a simple function with no parameters, that's why I delete the old function that returns a VB boolean and takes two Integers as it params. I checked out the link your provided but that's for a Variant type in VB6, do you mean I should use VARIANT in C++ for any VB6 type?
I was thinking... I always get the Access violation when reading... error, do you think that a type incompatibility can cause this?
What would you do in my place? This problem is driving me crazy!
Thanks again!
|
|
|
|
|
hi all,
please guide me and provide me a right direction.
currently I m using office automation and random password generation for this but is to time taking and slow process.
please help me to start for ms office file password recovery type application?
thanks in advance.
|
|
|
|
|
Le@rner wrote: please guide me and provide me a right direction. Learn how to do basic research[^].
Veni, vidi, abiit domum
|
|
|
|
|
I already do this this search list all recovery application.
not about the how to implement of code for this..
|
|
|
|
|
Then I guess you need to try contacting one of the authors of those packages.
Veni, vidi, abiit domum
|
|
|
|
|
really why those authors disclose their logics..
it means codeproject not help me for this...
|
|
|
|
|
Le@rner wrote: it means codeproject not help me for this... No, it means we don't have the answer.
Veni, vidi, abiit domum
|
|
|
|
|
can u please suggest me any other option or way to move on.
|
|
|
|
|
The only thing I can suggest is more Googling, and maybe some initiative. You also need to consider why passwords exist; if it was easy to crack them then there would be no reason to use them in the first place.
Veni, vidi, abiit domum
|
|
|
|
|
hi all,
is there any option to know the office file is password protected or not?
thanks in advance.
|
|
|
|
|
Try opening it?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I m using excel and word automation to open files is there any other method to chk file without opening the file is password protected or not.
coz other than excel and word files I m not able to open using automation....
and also if the file open function is inside the loop of random password generator and try with every new password to open the file the program becomes slower.
please help me,
|
|
|
|
|
Le@rner wrote: if the file open function is inside the loop of random password generator and try with every new password to open the file the program becomes slower. If you do not know the password then maybe you are not supposed to be opening the file.
Veni, vidi, abiit domum
|
|
|
|
|
yes file is not open and return exception of wrong password until the correct password is generated.
that's y I m taking help for another approach..
|
|
|
|
|
Le@rner wrote: ...return exception of wrong password until the correct password is generated. That seems to be the answer to your "is there any option to know the office file is password protected or not" question.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
not I m trying to open the file with different password if password is correct its open otherwise its generate the exception...
in my question "to identify the file is password protected or not" I m want to chk just before open the document.
|
|
|
|
|
In object-oriented languages, the term "interface" is often used to define an abstract type that contains no data, but exposes behaviors defined as methods. A class having all the methods corresponding to that interface is said to implement that interface. Source: WIKIPEDIA
I do not understand that how certain interfaces of Media Foundation APIs are getting created and working. Take IMFSourceReader for example. I understand that it gets created using MFCreateSourceReaderFromXXXX functions. But just a function call and nothing else?
- It should not be working in the first place.
- What class creates and implements it in the system?
Thanks for any info.
|
|
|
|
|
It's not an interface that gets created, though an interface will be made available for you to call, its an object that implements the interface that gets created, in this case an object implementing the IMFSourceReader interface. The object created just exposes the interface to the outside world as a known means of using it but when you call a method (or function) on the interface, the call is immediately passed on to the object to carry out the actual work.
|
|
|
|
|
Hi all .
step 1: create new project on visual studio (project1.exe)
step 2: create WinUtils.h and WinUtils.cpp on project1.exe and main1.cpp
step 3 : add new project (project2.exe) and create main2.cpp
Now I want to use WinUtils.h and WinUtils.cpp on project2.exe
example
//-----------------main2.cpp--------------------
#include "../utils/WinUtils.h"
int main()
{
bool value = WinUtils::isWin64bit();/ function static
return 0 ;
}
//--------------------------------------------
when i build code ,I saw error:
+ error LNK2001: unresolved external symbol "public: static int __cdecl WinUtils::Is64BitOS(void)" (?Is64BitOS@WinUtils@@SAHXZ)
+ fatal error LNK1120: 1 unresolved externals
I make sure that isWin64bit() function is "public static"
Please help me this problem .because my code has very much h and cpp files.
Thanks
Thong LT
modified 18-Dec-13 11:49am.
|
|
|
|