|
Hi,
Can anyone tell me how safe/unsafe it is to use dlls built in VC7.1 in the application which is built with VC6.
The dll built with VC 7.1 requires system dlls like mfc71*.dll, msvcp71*.dll, msvcr71.dll, etc. If I copy these dlls either in local foler or in system 32, the application loads fine, but Is it safe?
Please post your detailed comments. Also, if you know any URL for technical information do let me know.
Thanking you in advance.
Best regards
Vicky
|
|
|
|
|
If it's a normal win32 DLL, and the entrypoints don't take MFC classes as parameters, you should be fine, even if the DLL and the program using it use different versions of MFC internally. Passing MFC classes between modules built using different versions is just asking for trouble though.
Oh, and don't free in one module memory allocated in the other.
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades.
I don't know what you thought; I'm not your astronaut...
|
|
|
|
|
I have a 3rd party program that writes data to a selected file.
Instead of having the program write to a file, I'd like to be able to create a virtual file and capture the data the program writes.
I've tried doing it with named pipes, but I can't get it to work*.
Are there any other ways to create a virtual file?
Thanks
* Even though a simple CreateFile,WriteFile,CloseFile program works, the copy command returns "All pipe instances are busy." error and GUI programs just hang for a few seconds after I press save.
|
|
|
|
|
Forjer wrote:
I'd like to be able to create a virtual file and capture the data the program writes.
Do you mean intercept "write" calls to a certain file? If so, check out this utility.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I'm familiar with Filemon, but it doesn't help me get the data and skip the disk writing.
|
|
|
|
|
I was simply providing the link to give you an idea as to what is involved in intercepting file I/O. Suffice it to say, it's not a trivial undertaking.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I thought I could avoid api hooking because I can control the output file name.
I'm currently looking into madCollection as it appears I have to use api hooking.
|
|
|
|
|
Hi ,
WHat about memory mapped files ??? Iam not sure what you are looking for ....but looks like memory mapped file might help you ...
Cause is my effort;
Effect is God's effort
|
|
|
|
|
That's not going to help in my case.
|
|
|
|
|
SetThreadLocale does not seem to work... or does not do what I want it to do : on a computer with regional settings set to French (meaning the decimal point will be a comma), the following code
_tsetlocale(LC_ALL, _T(""));
BOOL bResult = ::SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT),SORT_DEFAULT));
CString strResult;
strResult.Format(_T("%.15g"),0.444);
::SetThreadLocale(LOCALE_USER_DEFAULT);
will write 0,444 in strResult and not the expected 0.444. I do not want to use _tsetlocale because all threads would be affected... and I do not want to have to synchronise them!
It seems like SetThreadLocale only allows you to change which resource you will access.
Any idea? Anything? Thanks in advance!
|
|
|
|
|
I'm thinking of writing a small utitlity app (or service) for my company to hook a certain url, and notify or stop the user from going there. For instance, if the user opens any browser (firefox, ie, etc) they should be able to go anywhere they want. But I would like to be able to detect if they go to www.notthissite.com/badpage.htm, and block it out or stop it. The reason for this is that we have an application that has a browser control that takes them to a specific url for data entry purposes. We also keep track of this input data in a database also, so we don't want them to put the data in through ie or firefox or whatever. I've come up with a few theories, but I don't know if any of them make any sense, so I'm just looking for any kind of input. Thanks in advance!!
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
Blacklisting URLs is best done at the firewall or gateway. That's one of the features they provide. Is there a reason why you can't go this route?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
well, our app needs to have access to it. Also, they should be able to go to www.that.com or www.that.com/products.htm, but not www.that.com/dataentry.htm. However, our app should be the ONLY one to be able to access this particular specific page. Our network admin knows about firewalls (which is why I can only get to a few select sites ), but the guy who worked on the app that hosts the web browser control said that he spoke to him and I guess they didn't come up with a solution. Plus, I don't know exactly what rights we'll be granted to their network, so I was thinking that having an app/service running that's part of our install would be the best solution. I don't know much about networking or firewalls myself, but would it be possible to only allow one .exe to access a certain url through the firewall settings?
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
BlackDice wrote:
I don't know much about networking or firewalls myself, but would it be possible to only allow one .exe to access a certain url through the firewall settings?
Possibly, but it's more conceivable to limit or deny access at the IP address level (i.e., only allow IP addresses in the xxx to yyy range to access this site).
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Can I declare the map class as follows?
typedef queue<unsigned char=""> clientBuf;
map<int,clientbuf> buffers;
Thanks a lot!
|
|
|
|
|
if you previsouly declared using namespace std; ,
yes, you can use map<key_type, value_type> myMap;
for example :
<font color=#008000>
<font color=#0000FF>#include</font><map>
<font color=#008000>
<font color=#0000FF>using namespace</font> std;
<font color=#0000FF>void</font> main(<font color=#0000FF>void</font>) {
map<CString, <font color=#0000FF>int</font>> myMap;
myMap["toxcct"] = 1;
}
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thanks a lot.
I would like to ask one more question. Can I replace the "int" with a class that is defined by myself?
Really thx~
|
|
|
|
|
of course, my answer was just an example...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
I'm trying to modify a html page using the CHtmlView class. I've overidden the onBeforeNavigate2 class and I get the document using GetHtmlDocument(). I then add some content to the page and that's when I get lost. How do I redisplay the page with the additional content.
Thanks in advance,
Ron
|
|
|
|
|
|
Neville,
Yes I've checked the articles at CP. I can create the view and edit the pages but can't seem to display the modified files.
I'll check Ehsan's articles,
Thanks for the help,
Ron
|
|
|
|
|
Hi Ron,
rlepine wrote:
I'll check Ehsan's articles,
I'm pretty sure you'll find what you need here. If not make another post.
In Surfulater I build the html on the fly and basically put it back into the view using PutinnerHTML().
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Here is from MSDN
OnMouseMove
point
Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window.
OnMouseWheel
pt
Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the screen.
Why is it that when I have the screen print out last known OnMouseMove point in OnMouseWheel the value is totally different from OnMouseWheel's pt? The value should be the same because cursor is still at the same location.
|
|
|
|
|
Because "Upper Left Corner of Screen" is NOT necessarily equal to "Upper Left Corner of Window". In most cases it is NOT equal.
See MapWindowPoints and ScreenToClient/ClientToScreen for converting points.
|
|
|
|