|
Hi all,
I have a C# application that uses vpc.dll. The application works without problems when running in VS. I have added a reference to the vpc.dll which reisdes in the project location (the same path as the .exe).
However, when I install the application on a client machine (using SetupProject in VS where I have included the vpc.dll to the application folder) the call to vpc.dll fails. Basically it will not run at all.
I'm fairly new to computer programming, but I find it strange that it works inside VS, but not when installed on client machine.
Thanks for any pointers!
|
|
|
|
|
If this is a COM dll, you will need to register it on the client machine.
Include the registration process in the setup install program.
|
|
|
|
|
Hi,
I have tried to register the .dll but I get an error message like "DllRegister" was not found, not a valid DLL or OCX file.... Not sure what this means but I've tried this both on the development machine and on the client machine.
|
|
|
|
|
You said you set a reference to this .DLL?? That means it's COM-based.
But now you're saying that if you execute "REGSVR32 vpc.dll" it complains that it can't find DllRegister. That means it's NOT COM-based.
I get the feeling you didn't set a reference to it because what you're saying is contradictory to itself.
|
|
|
|
|
I get the feeling (having tried to find out what vpc.dll was) that he's followed these[^] steps, so it's the wrapper for the COM client.
|
|
|
|
|
|
Kaare Tragethon wrote: the call to vpc.dll fails. Basically it will not run at all.
My suspicion is that you are missing something that vpc.dll is dependent on. Is this Virtual PC that you are trying to run?
|
|
|
|
|
You are correct, it is VirtualPC. I've "extracted" a .dll from the vpc.exe file (using tlbimp vpc.exe /out vpc.dll).
I've tried searching google A LOT, but there's very little (or no) documentation on this that I can find.... The only thing I could find was the above "extract" method....
Thanks!
|
|
|
|
|
Right - chances are then that the actual Virtual PC client isn't installed on the end users machine. Basically, your DLL is a wrapper for the COM calls - it's not a COM component so you don't need to register it, but it does need the actual COM object registered; in this case Virtual PC.
|
|
|
|
|
I see, thanks for the help!! 
|
|
|
|
|
No problem. I'm glad I could be of assistance.
|
|
|
|
|
I need to create a small program to
A. go to a website and login
B. Download a pdf to specified folder.
C. strip the pdf, drop that data to a database(SQL)
I am not looking for a gimme codezz.. just if anybody has a link to a couple of tutorials or articles that would show me the basics? I have not found any as of yet.(possible that my Google foo is down today its been a rough morning.) Mainly the first two parts that I have issues with, the last one I have something that somewhat works already.(but wouldn't hurt to understand it better.)
Thanks in advance for any suggestions given..
Let's face it, after Monday and Tuesday, even the calendar says WTF!
Be careful which toes you step on today, they might be connected to the foot that kicks your butt tomorrow.
You can't scare me, I have children.
|
|
|
|
|
A. might be hard depending on how annoying the website is, usually you just send a POST somewhere and then handle the cookies (see HttpWebRequest) but sometimes the site forces you to use javascript (may have to use a WebBrowser Control, which likes to steal focus (even when hidden) and generally get in your way).
B. is easy if you could use a HttpWebRequest in step A, a WebBrowser control again likes to get in your way and makes things hard.
|
|
|
|
|
yeah A is my biggest problem so far.. the rest I think I can figure out based on what I have, but I have to get past logging in and then going to the correct page..
Let's face it, after Monday and Tuesday, even the calendar says WTF!
Be careful which toes you step on today, they might be connected to the foot that kicks your butt tomorrow.
You can't scare me, I have children.
|
|
|
|
|
Ok typically that would look like:
Create a HttpWebRequest, point it towards the submit location of the login form, change the method to POST, use a CookieContainer, write some data (with percent encoding), then get the response.
Then just download the file with an other HttpWebRequest. Don't bother navigating. But send the cookies, otherwise you're not logged in anymore.
|
|
|
|
|
Thanks. I'll get to work on it.
Let's face it, after Monday and Tuesday, even the calendar says WTF!
Be careful which toes you step on today, they might be connected to the foot that kicks your butt tomorrow.
You can't scare me, I have children.
|
|
|
|
|
I have downloaded the TaskScheduler library and I'm able to use it without an issue. My problem is that I created a job in my Scheduled Tasks but when I run the command GetTaskNames(), the function returns just two system create jobs. Looking at the code I saw that the function only returns scheduled tasks that have a .job extension. How do I create a job that I can get access to via the TaskScheduler library.
Thanks
Bob
|
|
|
|
|
Bob Nona wrote: I have downloaded the TaskScheduler library
Very good. Which one? Is it from an article? If so, ask this question in the forum at the end of the article.
|
|
|
|
|
This is a known problem with the task scheduler API's. There are two versions of them. Jobs created with one version of the API cannot be seen by the other version of the API.
I can't remember the exact cirumstances and cannot find the link to where I read this right now, but it's out there somewhere.
|
|
|
|
|
Actually I didn't create the scheduled task using the API, I created it using the Task Scheduler on my computer.
|
|
|
|
|
Bob Nona wrote:
Actually I didn't create the scheduled task using
the API, I created it using the Task Scheduler on my computer.
And what do you think that used to create the Task? Yep, one of the API's.
|
|
|
|
|
So the tool in All Programs, Accessories, System Tools, Task Scheduler actually uses the APIs that I downloaded from Dennis Austin's article?
|
|
|
|
|
You did NOT download the API's for the Windows Task Scheduler. You downloaded a wrapper for the API's that makes it easier to use them in your own code. The API's are part of Windows, not something you downloaded.
|
|
|
|
|
The wrapper you downloaded only wraps the Task Scheduler 1.0 API. It will still create jobs that work under XP, Vista, and 7, but you will not be able to see those jobs and modify them using any tools that use the Task Scheduler 2.0 API, that includes System Tools -> Task Scheduler.
|
|
|
|
|
I NEED C# THAT DISPLAY DYNAMIC PHOTOGALLERY
|
|
|
|