Yeah, that. I've tried DirectoryIndex already.
hxhl95
Posts
-
.htaccess removing index.php from URLs -
.htaccess removing index.php from URLsHiya everyone, I've been getting quite a headache over this issue. Basically I just want to remove index.php from URLs, e.g. the URL
http://mydomain.com/index.php
should be changed tohttp://mydomain.com/
andhttp://mydomain.com/folder/index.php
should behttp://mydomain.com/folder/
. However, I also want to preserve any parameters passed to the page, e.g.http://mydomain.com/index.php?id=22&c=1
should be changed tohttp://mydomain.com/?id=22&c=1
andhttp://mydomain.com/folder/index.php?id=22&c=1
should behttp://mydomain.com/folder/?id=22&c=1
. I've triedRewriteRule ^(.*)$ /index.php?/$1 [NC]
but that just gives me an HTTP 500. Also triedRewriteRule ^index.php - [NC]
but that apparently does nothing. Help? :(( Thanks. -
CSS Image Sprites in IE7Thanks! I can't believe I forgot to try that. It's working fine now.
-
CSS Image Sprites in IE7Hi everyone, I've got a few icons I'm using sprites for, however they seem to work in every single browser except IE7. My code's very simple:
<div style="display:inline;margin:0 10px">
<a href="javascript:window.print()" title="Print">
Print PageĀ <div class="useicon" style="background-position:0px 0px"></div>
</a>
</div>My useicon class:
div.useicon {
display:inline;
height:16px;
width:16px;
background:url('../img/icons.gif') no-repeat 0px 0px;
padding:0 8px
}Now the problem apparently is the
display:inline
part of that - the sprites just don't show up as long as that div is inline (if I removedisplay:inline
the sprites show up but the thing is I want everything on the same line). Already tried usingspan
instead ofdiv
, unfortunately it appears that as long as the object is inline the sprites won't show up. Any suggestions? Thepadding: 0 8px
is there to keep the width at 16px, because some browsers completely collapse the div because it's empty even though I've specifiedwidth:16px
. Thanks in advance :) -
GDI+ JPEG to binaryThanks, it's working great. Do you have any suggestions on what I can do on the receiving end? I don't want to create a file and I don't want to allocate an entire buffer for the image either. Is there any way I can receive in chunks and still be able to display the whole thing at the end? Sometimes the image gets quite large (>10mb) and I don't want excessive memory usage. edit: nevermind. it's working now. thanks for all your help!
modified on Sunday, May 23, 2010 12:28 PM
-
GDI+ JPEG to binaryOkay, I've made a little progress:
Gdiplus::Bitmap bitmap(membit, NULL);
CLSID clsid;
GetEncoderClsid(L"image/jpeg", &clsid);
IStream* tmpbuf = NULL;
CreateStreamOnHGlobal(NULL, true, &tmpbuf);
bitmap.Save(tmpbuf, &clsid);
tmpbuf->Release();How do I change the IStream* into a byte* (and how do I determine the size beforehand)?
-
GDI+ JPEG to binaryHi all, What I am trying to do is transfer a screenshot over a socket. I can get the screenshot into a
Bitmap
type, and I can even save it as a JPEG file by getting theCLSID
of the encoder. However, I want to do this without an intermediatary file - that is, I want to be able to turn theBitmap
into a JPEG binary array and send it directly over the socket. I'm currently stumped at the turning theBitmap
image into a binary JPEG part - any suggestions would be nice. Or, if there is an easier way to do this that I'm missing, please assist. Been googling for a while now to no avail. Thanks :) -
mciSendString from inside a DLL?So why does it work from an EXE but not a DLL? And what should I do to fix it? :confused:
-
mciSendString from inside a DLL?Not quite sure where I should ask this...I mean, this site really needs a Windows programming section, doesn't it? Anyways, here goes. I have this DLL trying to call mciSendString (command passed as a parameter). The call works fine in an EXE, but it refuses to do anything on a DLL (I'm testing with "set cdaudio door open"). The function gets called but it hangs. Forever. Stack, if it helps:
ntkrnlpa.exe!ExAllocatePoolWithTag+0x8ab
ntkrnlpa.exe!MmIsDriverVerifying+0xa08
ntkrnlpa.exe!MmIsDriverVerifying+0x12ea
ntkrnlpa.exe!PoShutdownBugCheck+0x32ce
ntkrnlpa.exe!KeSynchronizeExecution+0x10c
ntdll.dll!KiFastSystemCallRet
!WaitForSingleObject+0x12
!waveOutWrite+0x50c
!mci32Message+0x526
!mciSendCommandW+0x10b
!mciSendCommandW+0x48e
!mciSendStringW+0x31
!mciSendStringA+0x87Thanks! :)
-
Forcing overflowing floats onto one lineHiya everyone, I have a dynamically generated (using the innerHTML property) set of list items that're floated into a 4-column list like follows:
<ul>
<li style="width:40%">text</li>
<li style="width: 20%">text</li>
<li style="width: 30%">text</li>
<li style="width: 10%">text</li>
</ul>The container that this list is in has to be able to dynamically resize. I've added
overflow:auto
to add scrollbars when the content in the box overflows. BUT, when the container is resized small enough, instead of having a horizontal scrollbar (the vertical one works fine) the rightmost <li> gets pushed down to the next line instead of staying on one line with the other 3 <li>s and overflowing off the side of the window, making a scrollbar appear. I've already triedwhite-space:nowrap
in half a dozen places. Refuses to work. I can't use a table either, as dynamically writing a table causes a runtime error in IE and I want this code to be as compatible as possible. Any help would be greatly appreciated (note the extreme emphasis on greatly) -
CWinApp <-> DLL communicationOh, I should've said this in my first post - I'm injecting this dll into selected processes, so the event that has to trigger a dialog box in my app could or could not happen and I don't know when it will happen. Hope that helps? :)
-
CWinApp <-> DLL communicationI'm using
LoadLibrary/GetProcAddress
in theInitInstance
of my class. -
CWinApp <-> DLL communicationHi there everyone, So I have my DLL that needs to communicate with my app. What I want to do is have the dll send my CWinApp derived class a message, and then the CWinApp should call
DoModal
with the dialog. Problem is, I've never messed with the app part of mfc, only the dialog class, so I have no clue how to set up the handler for the message. As well, since there is nohWnd
yet, I need to usePostThreadMessage
instead of the normalSendMessage
, but in my DLL I need to get the return value and then continue processing (like there would be withSendMessage
/DefWindowProc
). Any help on how to do so would be nice. ^^ :) -
Applicatio crashLooks awfully like a remote keylogger. :~
-
"Virtual" Command PromptOkay, that doesn't work either because the only ways I can actually call the command is ShellExecute or system() - they both cannot change the current directory. I'm going to try ShellExecute instead now, I think that might work. Thanks again for your help.
-
"Virtual" Command PromptNo, I haven't because I don't see how would I receive the output of any command with that method. I don't see how I can input stuff into it either...:confused: EDIT: aha, I see now. Going to try it right now. Thanks! :)
modified on Saturday, March 13, 2010 6:40 PM
-
"Virtual" Command PromptOh, and I can't distinguish between a successful command and an unsuccessful one (whether that command even exists or not).
-
Detecting Hooks [modified]Yes, I've been exploring that and I think I can continue from here. Thanks a lot for your help Baltoro! :-D
-
"Virtual" Command PromptHi All, I am trying to add a cmd functionality into my app, however it's not working very well and I am looking for alternate methods. What I'm going right now is taking an input command and using
CreateProcess
withcmd /C *command* > outputFile
, then reading the file and displaying the output. However, the problem with this approach is that if I want to start an app, lets say Notepad, I would not be able to do anything else until Notepad closes. As well, the cd command is rendered useless, as when cmd exits and I call another command, the new cmd created byCreateProcess
is still at the same directory. Does anyone have any suggestions for a different approach - perhaps somehow piping the input/output from the cmd window directly to my app? Thanks very much. :) -
Detecting Hooks [modified]"Also, if the application uses LoadLibrary and GetProcAddress to find the addresses of functions, your IAT hook will not work." Does that mean if I compare the addresses of HookedFunction() and LoadLibrary(HookedFunction) I would be able to detect IAT hooks in my process? If so, any suggestions on how I might generalize this to every running process?