Ah, I meant you'd given actual numbers, so I hope you didn't take that as a horrid demand! Cheers for info though.
cheesepirate
Posts
-
How big is a "big" Outlook PST file? -
How big is a "big" Outlook PST file?I like actual numbers. I think I may have to keep these facts to myself and be smug when all his mail goes up in smoke though. I don't think he's accepting dissenting views on this front. Cheers Dave.
-
How big is a "big" Outlook PST file?I'm writing an app that does some processing in outlook, and my boss keeps reminding me that he has a "small" outlook PST file - even though it's over 3GB in size. In my book, anything measured in gigabytes isn't small. I was wondering, in a "real" corporate environment, how big do system admins typically let their users data files get? Cheers, Dave
-
HttpWebRequest fails where WinINet functions succeedI have an app which communicates with a SharePoint server, and one of the things it does is uploads files to the SharePoint server using a HttpWebRequest. However I have found that this doesn't work when the file being uploaded is bigger than about 2mb and either of the following conditions apply - The user is at home and is using VPN to connect to the newtwork - The server is hosted on an ordinary broadband connection The request throws an exception saying 401, unauthorized. Using Fiddler to examine the http request going back and forth, I found that the exception is somewhat incorrect, and is actually referring to the first request of a pair (the first doesn't supply username/password, server asks for authorization, the second supplies the username/password). What has actually happened is that the server has just closed the connection and no reason is supplied as far as I can tell. It *might* even be a gateway timeout, but I very rarely even get a reply from the server under these conditions Using a Win32 app I have for testing things like this, I found that WinINet has no problems putting the file onto the server. I'm a little baffled as to what is happening here. Has anyone else had something like this or have any solutions? Dave
-
BindIFilterFromStreamI'm being driven slowly mad trying to figure out how to make this function work! I have a word document that I have in memory, and place this in an IStream derived class. When I try to BindIFilterFromStream, the Stat method in my class is called, then BindIFilterFromStream returns E_FAIL. It doesn't seem to even inspect the data held in the stream. Are there some special values I need to set during Stat? Does this function even actually work?
-
CredentialCache.DefaultCredentials equivalent in Win32/WinInetIs there a way to authorize with WinInet in the same way as using the CredentialCache.DefaultCredentials in .Net? Using WebClient and the DefaultCredentials is very nice in .Net, but I'd like to do the same thing in plain old C++ and Win32/WinInet. Cheers
-
Setting a stylesheet in AxWebBrowser controlAs far as I can tell that returns a read-only collection of stylesheet - if the page had a stylesheet to begin with I could possibly alter it, but not add to them I did manage a sort-of work around using the createStyleSheet method of msthml.HTMLDocumentClass. It does mean having to have the stylesheet in a file rather than generate it, but it does what I need it to.
-
Setting a stylesheet in AxWebBrowser controlHi I'm using a WebBrowser object in my form to display the results of a Dataset. All is good in formatting the html into a table, but I'm seeming stuck with the standard stylesheet - Times Font and all the other defaults. How can a set a stylesheet when I set the HTML data? Saving the report to a temporary file and navigating to it causes the control to use the stylesheet defined in the file, but I don't want to do it that way, I want to set the text and set the stylesheet all with my program. Cheers Dave
-
Drag 'n' Drop with WebBrowser problemsHi I have a form with a web browser control in it. I want to receive dragdrop notification when I drag things onto the from (mainly files from the desktop), however the browser control seems to be blocking the notifications. If a hold the icon over the borders of the form and title bar, I get notified, but not when the browser is in the way. How can I get notified no matter where I'm holding the item in the form? Dave
-
Safe version of unsafe codeI'm getting to grips with C#, but one thing still escapes me If I have a number, 0x12345678, and I need to reorder it for some reason to 0x56781234, I could do this in C/C++
int i = 0x12345678; short *ps = (short*)&i; short s; s = ps [0]; ps [0] = ps [1]; ps [1] = s;
i is then 0x56781234. This sort of problem also pops up when a file has some binary data encoded in such a way that 3 bytes are used to represent a 4 byte int (PowerPoint does this if I remember correctly) All attempts I've tried at this so far have resulted in unsafe code. I'd prefer a safe way, if this is possible. Cheers -
Arrays in c#Hmm, I think I'de prefer safe rather than sorry :) Basically, I'm wanting to do something along these lines
int array [64]; ... // Do something to array ... BitMangle (array + 8) // Do some sort of operation to the last 56 ints
I come from a really heavy C/C++ background and I'm trying to get to grips with C# - I'm getting most of it, but this one little thing has me! (ps - If there are some good book/articles I should read, do tell me) -
Arrays in c#I'm feeling a little dense here, but how do i do the C equivalent of
int array [16]; int * p = array + 8;
I've tried to look at the managed C++, but the program I'm using to convert to C# keeps crashing when I try to look at main() :( -
.Net vs Native development argumentWe're having a slight argument at work and I'm hoping you can resolve it one way or the other... (The app in question is squarely aimed at corporate environments, so home user type settings aren't relevant.) I'm saying that developing our new product in .Net will be faster and easier - the framework includes things that I'm currently having to implement myself, so I pretty much have double the amount to do compared to using .Net (and I'm running the risk of introducing bugs) The other side of the argument is based around there aren't that many .Net desktop applications and so a .Net app would be harder to market than a Win32 native app. Since this app is driving me a little mad, could someone tell me - are .Net apps harder to market? Do companies prefer to install Native apps over .Net apps? Do sysadmins dislike/have a hard time installing the framework in a corporate environment?
-
Default user credentials with WinInetIt appears to me that IE, if challenged by a web server for authorization will send my current username/password and try and authorise me with those before asking for another username/password. Is there something I can get obtain from the system to authorise a user with without having to ask for and supply the username/password? It looks like C# has something along these lines in CredentialCache.DefaultCredentials, but I need pure Win32 methods.
-
Function template passed as typename argument?Yeah they're the same, when I did my original cut'n'paste though I thought I read
template T maxi(T o1, T o2){return (o1 > o2 ? o1: o2);}
I do apologise for any confusion there:-O Though since we're on templates, I feel I need to clarify your statement about white-space... In a statement such as
std::map <std::string, std::vector<int> >
you really need that space between the >'s or the compiler thinks it's a shift-right operator
std::map <std::string, std::vector<int>> //Error!!
-
Function template passed as typename argument?Problem 1: Your template functions aren't quite right (I didn't notice at first myself) They should look like this
template <typename arg, typename T> arg Fun(arg i1, arg i2, T func) { return func(i1, i2); } template <typename T> T maxi(T o1, T o2) { return (o1 > o2 ? o1: o2); }
Problem 2: You can't use a function template as a function argument. That means the even with the correct definitions, it still won't work. Harrumph! Solution: Functors are like functions and classes all in one go - the STL uses them in the collection classes to order elements. I re-wrote the functions like this...#include <iostream>
using namespace std;
template <typename T>
struct Maxi
{
T operator () (T o1, T o2)
{
return (o1 > o2 ? o1: o2);
}
};template <typename arg, typename Func = Maxi <arg> >
struct Fun
{
arg operator () (arg i1, arg i2)
{
Func func;
return func(i1, i2);
}
};int main(int argc, _TCHAR* argv[])
{
int a (10), b (15);
Fun <int> fun;cout << fun(a, b) << endl; return 0;
}
Lo and behold, I get 15 as my output! Ask anything you're unclear about and I'll try and clarify :)
-
Taskbar icon mouse messages and keyboard modifiersMSDN says that when I receive a WM_LBUTTONUP or any other message concerning a mouse click, wParam should contain any keyboard modifiers and lParam the cursor position. However, when I get these messages from a taskbar icon, wParam is always set to 1. Is it possible to modify the click to the icon with a keyboard modifier? And if so, is it possible for me to pick that up? Cheers Dave
-
Detecting KeyboardHardware changes cause the WM_DEVICECHANGE message to be sent - You might be notifed with that I guess... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/wm\_devicechange.asp
-
Network connected notificationI was wondering, is there a message or callback similar to WM_DEVICECHANGE that signals that the network is now connected? I just tried a little application displaying all message I didn't process while connecting/disconnecting and didn't see any changes to my list of messages. Is it possible to be informed that the computer is now connected to the network/internet with out doing a test every so often? Cheers Dave
-
Does anything affect Sleep ()Yeah, it's not good - I got a program dropped on my desk and while I'm fixing it by re-writing it, I still have to try and make the old version work :(