On the res:// protocol
-
Hi, I am creating an app that integrates the CHtmlView. On certain occasions, I would like to load a HTML file (or images) from a resource dll, so that all the files are kept together, cannot be deleted or edited etc. Has anyone succeeded in creating a DLL with resources in it used by Internet Explorer and the res:// protocol? If so, could it be explained how, or does anyone have *decent* links to: 1. how to create a resource dll 2. how to make resources accessible from it to IE and the res:// protocol Thanks in advance, Simon :confused: PS: I have seen the (very) few MSDN articles, that have left me suitably high and dry.
-
Hi, I am creating an app that integrates the CHtmlView. On certain occasions, I would like to load a HTML file (or images) from a resource dll, so that all the files are kept together, cannot be deleted or edited etc. Has anyone succeeded in creating a DLL with resources in it used by Internet Explorer and the res:// protocol? If so, could it be explained how, or does anyone have *decent* links to: 1. how to create a resource dll 2. how to make resources accessible from it to IE and the res:// protocol Thanks in advance, Simon :confused: PS: I have seen the (very) few MSDN articles, that have left me suitably high and dry.
Do you mean
res://yourdll.dll/yourpage.html
? -:suss:Matt Newman / Anti-Linux Activist:suss: -Sonork ID: 100.11179:BestSnowman
† -
Hi, I am creating an app that integrates the CHtmlView. On certain occasions, I would like to load a HTML file (or images) from a resource dll, so that all the files are kept together, cannot be deleted or edited etc. Has anyone succeeded in creating a DLL with resources in it used by Internet Explorer and the res:// protocol? If so, could it be explained how, or does anyone have *decent* links to: 1. how to create a resource dll 2. how to make resources accessible from it to IE and the res:// protocol Thanks in advance, Simon :confused: PS: I have seen the (very) few MSDN articles, that have left me suitably high and dry.
Create an HTML resource in your module (can be an EXE or DLL) with a string ID (not an integer ID) and reference it like: res://C:\path\to\your\file.dll/YOURPAGEID.html --Mike-- Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines! My really out-of-date homepage Big fan of Alyson Hannigan and Jamie Salé.
-
Do you mean
res://yourdll.dll/yourpage.html
? -:suss:Matt Newman / Anti-Linux Activist:suss: -Sonork ID: 100.11179:BestSnowman
†Yup, that's exactly what I am after. I created a Win32 Dynamic-Link Library project (empty) and ripped all the code link settings out, then added a resource file. To that I added a HTML resource, with the resource identifier IDR_HOME. This resulted in the following line being in my resource file when viewed as text: IDR_HOME HTML DISCARDABLE "home.htm" Also, a home.htm file gets created in my project folder, so I put in some source and then build it. Then typing in the actual path (given here for completeness): res://C:\Program Files\Microsoft Visual Studio\VC98\MyProjects\HtmlRes\reslocal\Debug\reslocal.dll/home.htm simply results in the 'Page Cannot be Displayed' IE error from it's own shdocl.dll thingy. Anything obvious I am doing wrong here? Thanks, Simon
-
Yup, that's exactly what I am after. I created a Win32 Dynamic-Link Library project (empty) and ripped all the code link settings out, then added a resource file. To that I added a HTML resource, with the resource identifier IDR_HOME. This resulted in the following line being in my resource file when viewed as text: IDR_HOME HTML DISCARDABLE "home.htm" Also, a home.htm file gets created in my project folder, so I put in some source and then build it. Then typing in the actual path (given here for completeness): res://C:\Program Files\Microsoft Visual Studio\VC98\MyProjects\HtmlRes\reslocal\Debug\reslocal.dll/home.htm simply results in the 'Page Cannot be Displayed' IE error from it's own shdocl.dll thingy. Anything obvious I am doing wrong here? Thanks, Simon
Make the resource ID "HOME.HTM" with quotes, then
red://reslocal.dll/home.htm
will work. -:suss:Matt Newman / Anti-Linux Activist:suss: -Sonork ID: 100.11179:BestSnowman
† -
Make the resource ID "HOME.HTM" with quotes, then
red://reslocal.dll/home.htm
will work. -:suss:Matt Newman / Anti-Linux Activist:suss: -Sonork ID: 100.11179:BestSnowman
† -
Create an HTML resource in your module (can be an EXE or DLL) with a string ID (not an integer ID) and reference it like: res://C:\path\to\your\file.dll/YOURPAGEID.html --Mike-- Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines! My really out-of-date homepage Big fan of Alyson Hannigan and Jamie Salé.
-
Absolutely stunning! Cheers so much Matt. I wasn't far away (well I was), I had it working with the resource identifier bit: blah-blah/%23101 The quotes has just made it all look so much more friendly when the source if viewed etc. Thanks again, Simon
No problem. It was a simple problem with an answer someone would never think of :) -:suss:Matt Newman / Anti-Linux Activist:suss: -Sonork ID: 100.11179:BestSnowman
†