|
What does this have to do with ATL/WTL? You are in the wrong forum...
|
|
|
|
|
Can you more explain and with which language?
|
|
|
|
|
Hi all!
I want to know how to pass an array of long to the method of COM
and how to return the array of long from that method.
Viral Joshi.
|
|
|
|
|
|
Hello,
Read the article on MSDN: “How to Pass Arrays between Visual Basic and C”. http://support.microsoft.com/kb/207931
Some more links:
1. "Passing an array from VC++ DLL to VB", by Amol Kakhandki on Code project. http://www.codeproject.com/dll/ctovbarray_passing.asp
2. http://www.manbu.net/Lib/En/Class5/Sub7/1/23.asp
Regards
|
|
|
|
|
This[^] might help.
Steve
|
|
|
|
|
Hi,
I'm kind of new to ATL programming, but I have been working with it quite extensively over the past few months. I've been writing code for a toolbar for IE and unfortunately I got stuck on one part and have no idea how to solve it. Google and MSDN are not being very helpful, but I think that the main reason I'm having trouble is because I do not understand the concepts fully.
Anyway, here is the problem: I want to be able to detect the WM_INPUTLANGCHANGE message within my toolbar. I tried adding it to the MESSAGE_HANDLER to one of the windows, but it seems to be ineffective.
Any information you can give me to point me in the right direction would be great!
You can assume that the code I have is the same as in this tutorial:
http://www.codeproject.com/atl/ietoolbartutorial.asp
Thank you in advance,
Andrej
|
|
|
|
|
What are the conditions in which a CAB fiel refuses to overwrite a previous downloaded instance in IE.
Is it the time-stamp of the CAB file;or do CAB files need to mention a versioning too.
We are downloading a CAB file from a jsp with a OBJECT tag.
After we modify the CAB file and repackage it ,we find that CAB file does not download the new instance again,as the old instance is already downloaded into the client box.
We are creatign the CAB file with visual studio.
If versionign is the answer to overwriting downloaded CAB files from IE - how do we version CAB files in 'VS Deployment type of projects'
|
|
|
|
|
You need to increase the version attribute in the web page. The modified date of the CAB itself is irrelevant. Think about it, the original CAB is discarded after it's installed, and even if it were kept around, IE would have to download the entire CAB file every time you visited the page just to check the date.
|
|
|
|
|
I am working in the compact framework.
I have an ATL object that needs to draw on a bitmap. I need to pass the bitmap to a C# program and display it. We have tried creating the bitmap in C# with GDI methods then used the APIs for CompatibleDCs, selectobject, getHdc, etc and passed the DC to the ATL object. On returning it from the ATL object I get ExceptionHandling errors relating to memory when I try to get a bitmap I can use in managed code. We have been able to pass the DeviceContext and draw directly on it but I want to retrieve a bitmap that I can cache as a member variable in my class.
Has anyone successfully passed bitmaps back and forth between managed and unmanaged code?
|
|
|
|
|
arcticbrew wrote: Has anyone successfully passed bitmaps back and forth between managed and unmanaged code?
Yes
led mike
|
|
|
|
|
Hi Mike thanks for responding. Would you describe the method you used.
I tried creating a bitmap from the device context of the screen, passing the Device Context and hBitmmap to unmanaged code, drawing on the bitmap in unmanaged code and passing back to managed code. But when I try to draw in managed code using GDI I get a memory exception.
|
|
|
|
|
I passed only HBITMAP
led mike
|
|
|
|
|
how are you drawing to the bitmap in unmanaged code? Don't you need a Device Context?
|
|
|
|
|
hi c++ guru.
i need your help... i'm new in hardcore c++ and currently working on a c++ container namely the priority_queue. i don't have problem using the priority_queue itself but i have this additional requirement to also consider the age of the items in the queue.
my current implementation only deals with the priority of the items in the queue by overloading the "<" operator. i don't know yet what to do when considering the age of the items in the priority_queue.
any help is greatly appreciated...
PS: sample code would be a great help...
charian
|
|
|
|
|
|
You can make another priority_queue that stores the priority as the time you added the item to the priority_queue . Store a pointer to the same item in both queues? Of course, this is kind of an ugly way of doing it.
I recently made a priority_queue that stores pointers to Event objects. Each Event stores the time the event should run, as well as other important information it needs when it runs. I overloaded operator() and operator< to handle comparing the Event->_nTime to another Event->_nTime .
Basically I pop the next Event to run (smallest time) and run it when it's time has come.
Unfortunately, i don't think that approach will help you. Sounds to me like you want to extend the priority_queue itself to track age of items as well as priorities, which is pretty difficult. Easiest method might be to use two of them like I mentioned above.
Maybe some more details on what your program does?
|
|
|
|
|
Hi,
If you use the VS wizard to create your own ATL-based COM object, the post-build step will register the object. The problem is, that registration step fails if you're not administrator on your machine (since it requires full access to the registry).
My normal day-to-day account is non-admin for security reasons. Has anyone found a good solution to this? I don't mind registering the object on occasion (with the admin account), but 99% of the time I'm changing functionality and not changing anything about the registration itself. Maybe there's a way to skip the registration process? I couldn't see a way since VS seems to do it automatically rather than with an explicit build step.
Thanks for any ideas,
DB
|
|
|
|
|
dburns wrote: Has anyone found a good solution to this?
The activity of developing software typically requires administrator privileges, get them.
led mike
|
|
|
|
|
led mike wrote: The activity of developing software typically requires administrator privileges
I'm not sure I'd agree with that statement. With the exception of registering COM objects, I see no reason why admin privileges are needed for software developement. Basically developing non-COM code requires the ability to edit/create files.
BTW I'm talking about my own machine here, so I can easily give my account admin privileges -- but I'm trying to keep my normal account non-admin so I minimize damage from either myself or worms etc.
Anyway, just looking for any tips in case someone has gone this route before.
|
|
|
|
|
dburns wrote: I'm not sure I'd agree with that statement. With the exception of registering COM objects, I see no reason why admin privileges are needed for software developement.
Well as long as you see no reason then they must not exist... problem solved. Hopefully I can remember to avoid answering your posts in the future.
led mike
|
|
|
|
|
Hey Mike,
Sorry if that came out wrong. I was trying to be careful to phrase things in a non-offensive way, but apparently I suck at that. By "I see no reason" I wasn't saying there weren't any, I was just saying that I'm not aware of them. I intended that to be an opening for you or anyone else to provide an example. I guess I should have said "what are the reasons" instead.
led mike wrote: Hopefully I can remember to avoid answering your posts in the future
Please don't do that! It's just a misunderstanding. I do appreciate input of any sort.
Sorry for any bruised feelings.
DB
|
|
|
|
|
dburns wrote: Please don't do that! It's just a misunderstanding. I do appreciate input of any sort.
It is certainly dependent on your environment. Mine have mostly been extremely volatile and with todays speed pressures the last thing I need to deal with is privilege issues. When I want to install trial software package or start a new database instance or write and install a new Service or a GAC component or "whatever" for research I can't afford to lose time dealing with privilege issues because the paper pushing crackhead executives are breathing fire about their latest date proclamations. But that's just me.
led mike
|
|
|
|
|
Personally, I disagree with you - when developing (i.e. designing, coding, testing software), you should have the same privileges as your target customers, which these days is more likely to be non-admin. Otherwise, you're more likely to develop apps that assume admin privs, when your customers don't have them.
I've been developing as a non-admin (with a separate admin account for when admin access is really needed) since I started using Windows 2000 in mid-2001. No problem. Seethis page[^] for useful hints and tips re: developing as a non-admin.
|
|
|
|
|
Stuart Dootson wrote: when developing (i.e. designing, coding, testing software), you should have the same privileges as your target customers
Why, are your target customers developing software? That is just retarded and not the first time I have heard it. You need machines configured as customer machines to "test" your software and installations. That is not at all the same as a developers workstation because... well it just isn't kind of like how apples are not the same as oranges even though they are both fruit.
led mike
|
|
|
|