|
TClarke wrote: I'm calling IPersistFile:Save on my local machine logged in with administrator rights and I'm getting a security error any ideas would be very welcome.
I'm using VS2005 on XP SP2
Since it is a security error, I think it is important to know where you are saving to. Even as an administrator, there are parts of the system you aren't allowed to modify.
Nathan
|
|
|
|
|
I'm getting the same error on W7 using VS 2008 and the same sample code. I am writing to a temp folder with security set to all access for "Everyone" from a shell running with Administrator priviledge. It still doesn't work.
Probably, as usual, MS sample code is incomplete, or not even wrong.
-Geoff
|
|
|
|
|
Hello all, I know the experts on codeproject can deal with any of my sneaky questions... try this one:
What .tlb is the definition of IDataObject in?
Why do I need it: I have my own interface with IDataObject as an argument of one of its methods. The type library compiled from that .idl contains beside my own interface also IDataObject and a couple of others, which are referenced by it. As a consequence, the proxy for that interface is wrong and drag and drop stops functioning in my app . I tried to find a type library to put in importlib("") statement, but did not find it. There must be something obvious I am overlooking.
Thanks for any advice
|
|
|
|
|
Vlasta_ wrote: Why do I need it: I have my own interface with IDataObject as an argument of one of its methods. The type library compiled from that .idl contains beside my own interface also IDataObject and a couple of others, which are referenced by it. As a consequence, the proxy for that interface is wrong and drag and drop stops functioning in my app . I tried to find a type library to put in importlib("") statement, but did not find it. There must be something obvious I am overlooking.
I can think of a couple other options. One is to provide custom marshaling for your method. Another is to just pass an IUnknown and query for IDataObject in your code. I tried to find the tlb for IDataObject and I couldn't find it either.
Nathan
|
|
|
|
|
Thanks, I may end with the IUnknown workaround, but I am still hoping to locate the tlb somwhere.
|
|
|
|
|
Look at ...\Microsoft Visual Studio\Common\IDE\IDE98\VJEXT.TLB
With best wishes,
Vita
|
|
|
|
|
I've a component(dll) has developed in vb. I can able to refer the dll and the method can be called in vb. I've checked its working fine. But in asp I've created object using Server.CreateObject and when I call the same method, it shows "permission denied" error. If anybody having idea pls. help me.
Rishihar S
WinCrs
|
|
|
|
|
|
Hi,
I have one MDI application TrialApp.exe and a COM exe MathOperation.exe.COM exe was generated through ATL.Now from a modeless dialog in TrialApp.exe i am accessing a model dialog in MathOperation.exe.
1.Run TrialApp.exe
2.Modeless dialog pops up.
3.Enter the input values.
4.Press a button->calculate.
5.Pops up a dialog from MathOperation.exe
6.Now without closing the dialog(from MathOperation.exe) just click on the modeless dialog(TrialApp.exe)
7.Shows server busy message.
This happens in XP and Vista.If i make the dialog model in TrialApp.exe then the message is not coming.Please help.
Thankyou
modified on Wednesday, March 19, 2008 1:30 AM
|
|
|
|
|
I may not be correct here because I don't know how your COM server is implemented (design/architecture)
I believe your TrialApp.exe dialog is making a blocking call to MathOperation.exe (specifically it's waiting for MathOperation.exe method to return, but this method has an active Modal dialog).
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I wrote an ActiveX Control, I hope it can show different picture every 10 seconds. So I start a work thread, it prepairs the picture's data and calls the control's FireViewChange method every 10 seconds.
Now it seems like that FireViewChange call does not work because the picture that control shows out won't change until I resize the test web page.
My control is apartment thread mode and I call CoInitialize(NULL) in my work thread.
What changes should I do to make my control work as I want? Thank you.
|
|
|
|
|
Hello samfromcn,
It is possible that you have not marshalled the ActiveX's event interface (which contains the FireViewChange() method) to your worker thread.
- Bio.
|
|
|
|
|
Thank Bio,
Someone said that FireViewChange interact with the container, then the container tells the control to redraw. It's a little complicated for me. Now I create a hide window in main thread, work thread send user message to the window, the window call control's FireViewChange. This is easy to implement and it works well^_^.
|
|
|
|
|
Hello samfromcn,
>> Someone said that FireViewChange interact with the container...
Yes, the "container" is actually what we know of as the "apartment". It is a good analogy.
>> Now I create a hide window in main thread, work thread send user message to the window, the window call control's FireViewChange...
This will certainly work. It also works similarly to the actual industrial practice of firing an event from across a separate thread via a proxy to the event interface of the ActiveX marshalled in from the main thread.
However, samfromcn, it is better to learn event interface marsalling in the long run.
Best of luck,
- Bio.
|
|
|
|
|
Using C#, a COM Method uses ref Parameter and it works smoothly, But is it a good principle to use ref Parameters with COM Methods,
|
|
|
|
|
madhankum wrote: Using C#, a COM Method uses ref Parameter and it works smoothly, But is it a good principle to use ref Parameters with COM Methods,
That depends on what type you are referencing. Also, are you calling from C# to COM, or from COM to C#? Either way, is it possible for the data type you are referencing to chang on one side, but not the other?
Nathan
|
|
|
|
|
Hi,
I have a spreadsheet with a worksheet. I have a filter on this worksheet. I want to write a loop and display the data of each cell in each row (for the filtered rows only). I have the following code, but I can't seem to find a solution on how to check the value of each cell in each row:
Dim rng As Range
Dim intRowCnt As Integer
Set rng = ActiveSheet.AutoFilter.Range
intRowCnt = rng.Columns(1).SpecialCells(xlCellTypeVisible).Count
Please can someone help me?
Thanks
Brendan
|
|
|
|
|
[Message Deleted due to spam]
|
|
|
|
|
I don't know for sure, but you could write a Javascript function and call that Javascript function from your Flash snippet.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi, I'm trying to add a custom header for every HTTP request of a IWebBrowser2 instance.
I known that the param Headers of the method IWebBrowser2::Navigate2 allows me to add custom headers but the problem is that it's valid only for the main request and it's not "propagated" for all the related requests of resources (for example).How can I hook every request and alter the headers?
Plz help!
|
|
|
|
|
Hello All,
I'm pretty sure this can't be done, but I don't feel comfortable with that assessment until I put this to you folks. I've been given a standard c# dll that has various financial calculations. It's used via a com wrapper in a visual foxpro app. I've been given the lovely tasks of debugging a slew of errors, but I'm trying to determine the best way to do this. Has anyone made calls from some com app to a .net dll and been able to debug the dll at the same time?
Thanks in advance,
Ryan
|
|
|
|
|
|
I am working on the custom renderer (based on the sampVid),and I am
using the MediaPlayerClassic applciation to test my renderer
The problem I am facing is when I use my renderer when I pause the
video and minimize and maximize the Media player classic I can see my
IVideowindow doesnt repaint the frame back ,right now I am using the
below code in the IvidoeWindow Receivemessages
to black out the Ivideowindow before playback start.
if (uMsg == WM_ERASEBKGND)
{
EXECUTE_ASSERT(GetClientRect(m_hwnd,&ClientRect));
HBRUSH hBrush = CreateSolidBrush(RGB(0,0,0));
EXECUTE_ASSERT(FillRect(m_hdc,&ClientRect,hBrush));
EXECUTE_ASSERT(DeleteObject(hBrush));
return (LRESULT) 0;
}
can any one please help me out how to repiant the paused frame
back ,when I do minimize and maximise on pause
any suggestion will be a great help.
Kesav
modified on Thursday, March 13, 2008 1:21 AM
|
|
|
|
|
Hello
Im new to this place and quite new to windows programming. I want to start to program with directx and I have read somewhere that you'll need to understand COM programming. And I also read somewhere that COM is getting replaced by .NET. Is it better then to learn .NET instead of COM? Or is it better to stick with COM? What is the difference between COM and .NET anyways?
I'll be programming in C++ as I want parts of my application to be portable to linux. Will it be a problem to use C++ with .NET?
Thanks
Karl
|
|
|
|
|
Karl Hansson wrote: Hello
Im new to this place and quite new to windows programming. I want to start to program with directx and I have read somewhere that you'll need to understand COM programming. And I also read somewhere that COM is getting replaced by .NET. Is it better then to learn .NET instead of COM? Or is it better to stick with COM? What is the difference between COM and .NET anyways?
I'll be programming in C++ as I want parts of my application to be portable to linux. Will it be a problem to use C++ with .NET?
Thanks
Karl
If you're using C++ for portability to linux, COM sounds like your best bet. COM provides a binery standard for using native code. .NET is based on a pcode system that is intended to be portable among windows systems.
Nathan
|
|
|
|