|
Hi Gerry
I tried changing the parameter type to an IntPtr without the ref and using IntPtr.Zero in the call but that results in a "Value does not fall within the expected range." exception at runtime.
If I keep the ref it complains that IntPtr.Zero is a static const so can't be used as a ref parameter. Using a variable of type IntPtr instead causes a memory access violation.
|
|
|
|
|
If you could provide a more complete sample then others could actually try out their suggestions first. As it stands, it's not that easy to reproduce your problem.
|
|
|
|
|
You can try changing the ushort parameter to an IntPtr and just send in 0.
|
|
|
|
|
Hi Dave
I tried changing the parameter type to an IntPtr and using IntPtr.Zero in the call but that results in a "Value does not fall within the expected range." exception at runtime.
|
|
|
|
|
Well, it was worth a shot.
|
|
|
|
|
Create an overload with that parameter changed to System.IntPtr and pass System.IntPtr.Zero when you require null.
|
|
|
|
|
Pass whatever NULL is in the Windows libraries, which I think will be 0.
|
|
|
|
|
hi! i wrote a code for a GPS sever which analyse the trame received from a client and thanks to this trame, it may localise tha place in which the client is situated! How can i modify the trame and the code so the client will be abla to send in the trame a sign to show if he is in emergency!
and please where i can fnd exemples of trames of a person who is moving ?? Help please!!!
|
|
|
|
|
You're going to have to explain what a "trame" is.
|
|
|
|
|
it is a frame: the message that receives the server and contains the informations! in mu code i used a frame GPRMC sent by a client! sorry i am used to study in frensh that's why i used the word trame
|
|
|
|
|
I have a C# application that tests a product my company developes. At the moment this application can be run on a ordinary laptop. I have now started to develope new tests that requires specific hardware and dll:s. These new tests can only be run on a computer that has this hardware installed.
What is the best solution if I still want to be able to use the same application on an ordinary laptop to run the other tests that don't requires the new hardware? The "ordinary laptop" is missing the dll:s that my application is using to communicatio with the hardware.
|
|
|
|
|
I can think of 3 ways you could do this:
1) Enable remote debugging in Visual Studio and run all the tests on a computer with the hardware installed. So your laptop can run the tests and the hardware also.
2) Add a few conditional compile options around the calls you have into the hardware specific DLLs - this makes them not execute at all.
3) Stub out the hardware DLLs on your dev laptop by creating special versions of them that run without the hardware attached. So basically, they can return to you known data when called, and do nothing when no return data is required.
|
|
|
|
|
I think the most widely used point for these situation is what you have proposed as 3rd option. Simply Mock your hardware specific assemblies (I don't know how hard that is), this way on a laptop you can test only your code and in the mocks implement whatever functionality you need assuming that "the hardware" works ok. When running the tests on the actual device you can simply remove the mock assemblies and you can also run your tests.
|
|
|
|
|
Load the DLL dynamically depending on the Hardware (take a look at Assembly.LoadFrom).
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
How to reduce the size of a pdf using free libraries in C#.
|
|
|
|
|
You can archive it, using something like (PK)ZIP or LHA(rc). Alternatively, you could compress your entire drive.
You can't make it smaller without "packing it". If that were possible, we'd be wasting a lot of resources by not archiving everything.
If the file is too big, take a look at the embedded files; I'll bet there a huge image in there that can be rescaled.
|
|
|
|
|
I didn't got your solution!!1
let me be more specific...
1. I am creating a policy (Insurance) from a database. This pdf file is about the size of 5 MB and with only 2 images.
2.I can't convert it into zip, so i need the output in pdf only
thanks for your reply but seeking for a specific answer from your side!!!
|
|
|
|
|
This was the specific answer; if PDF's could be "smaller", wouldn't everyone save them in the "small" way?
How big is the image? And when you convert it to a bitmap?
How big is the PDF without images?
|
|
|
|
|
I am giving u the link to download a sample pdf similar to my policy pdf (i can't give you the pdf generated from my application)
here is the link http://pdfcast.org/pdf/insured-lloyds
-- modified 4-Dec-12 9:46am.
|
|
|
|
|
Both pictures are black & white? Can you post a link to the pictures?
What version of the PDF-format is being written?
|
|
|
|
|
the pdf which is generated by the application is not having more than 2-3 images and all images are compulsory black and white!!!
and the version is 10.0
sorry for late reply bro!!!
|
|
|
|
|
I have 2 solutions WFPath and ParToChildWF that are being called in different workflow nodes and different workflows.
The error is System.TypeLoadException: Could not load type 'WFPath.Class1' from assembly 'ParToChildWF, Version=1.0.4720.26649.
What am i doing wrong?
|
|
|
|
|
Peaches2010 wrote: I have 2 solutions WFPath and ParToChildWF that are being called in different workflow nodes and different workflows.
The error is System.TypeLoadException: Could not load type 'WFPath.Class1' from assembly 'ParToChildWF, Version=1.0.4720.26649.
What am i doing wrong?
You referenced the assembly of the project, and now that the solution is rebuilt, that specific assembly is gone. I'd suggest to add the project as a reference.
|
|
|
|
|
I added the references and ran the workflows I'm still getting the same results.
|
|
|
|
|
Some project is referencing an outdated (compiled) class.
|
|
|
|