Re: [Mono-dev] Mono and ole32.dll

2011-06-09 Thread nekresh
On Thu, Jun 9, 2011 at 8:33 PM, Cosmin Ciuraru  wrote:
> Thank you for your answer, Quandary.
> I try to use the Acrobat SDK in order to fill in a pdf and digitally sign
> it. In order to do that, I use the Javascript part of the SDK and the
> JSObject can be used from C# with the use of Interop.Acrobat and
> Interop.AFORMAUTlib. Unfortunately, Acrobat SDK needs the Adobe Acrobat
> installed, not the Reader and, for Linux, there is no version of Adobe
> Acrobat (May be I am wrong, because for Acrobat 7.0.5 SDK they have a Linux
> version of the SDK - the only Linux version - but how could one use it?).
> So, I cannot use it.

You can use another library which will run on windows and linux,
without the COM dependency, iTextSharp for example
(http://itextsharp.com/)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] excute linux command under mono C#

2011-05-18 Thread nekresh
The command is executed with the same use running apache.
So if apache's user doesn't have the rights to access/read/write to the
files, then your command neither.

You can try to "su apache_user" and try this command.
It's the same problem as not being able to move the files directly with the
mono API.

On Wed, May 18, 2011 at 12:54 PM, harmeet.si...@onebcg.com <
harmeet.si...@onebcg.com> wrote:

>  Hi
>
> Finally it works. Thanks
>
> Still having one problem. It works for physical path. But when we are
> trying to copy files to folder (mounted with amazon S3) it gives error. Log
> file shows permission denied error.
>
> Copy works while executing command from command line but doesn't run when
> executing from application. May be Apache/Mono server running application
> doesn't have full permissions.
>
> Any Suggestion.
>
> Thanks again for your help.
>
>   Regards,
>
> Harmeet Singh
> Software Engineer .NET
> Ext: 3023
>
>  Phone AU: +61 2 9114 6001|IN: +91 172 424 |UK: +44
> 2070 99 88 50|US: +1 866 420 9555
>  FaxAU: +61 2 9114 6002|IN: +91 172 424 8889|UK: +44 2070
> 99 49 55|US: +1 480 304 3080
>  [image: ONE BCG] <http://www.onebcg.com>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
> Please consider the environment before printing this email
>
>
>
> On 5/18/2011 2:06 PM, nekresh wrote:
>
> Standard non-error exit code on linux is 0
> If you get something else then an error as occured.
>
>  Are you sure that both path exists ?
> Do you have read/write rights ?
>
>  On Wed, May 18, 2011 at 10:22 AM, harmeet.si...@onebcg.com <
> harmeet.si...@onebcg.com> wrote:
>
>>  Hi
>>
>> I tried the code. My code is
>>
>> protected void Button1_Click(object sender, EventArgs e)
>> {
>> Label1.Text=Execute("/bin/cp"," -rp
>> /usr/local/lib/xsp/test/2.0/projectname/invoices/
>> /usr/local/lib/xsp/test/2.0/projectname/testupload/").ToString();
>>
>> }
>> internal int Execute(string exe, string args)
>> {
>> ProcessStartInfo oInfo = new ProcessStartInfo(exe, args);
>> oInfo.UseShellExecute = false;
>> oInfo.CreateNoWindow = true;
>>
>> oInfo.RedirectStandardOutput = true;
>> oInfo.RedirectStandardError = true;
>>
>>
>>
>>  Process proc = System.Diagnostics.Process.Start(oInfo);
>> proc.WaitForExit();
>>  int exitCode = proc.ExitCode;
>> proc.Close();
>>
>> return exitCode;
>> }
>>
>>
>>  Output returned is 1. But Files are not copied to destination folder. Any
>> suggestions.
>>
>>   Regards,
>>
>> Harmeet Singh
>> Software Engineer .NET
>> Ext: 3023
>>
>>  Phone AU: +61 2 9114 6001 <%2B61%202%209114%206001>|IN: +91 172
>> 424  <%2B91%20172%20424%20>|UK: +44 2070 99 88 50|US:
>> +1 866 420 9555 <%2B1%20866%20420%209555>
>>  FaxAU: +61 2 9114 6002|IN: +91 172 424 
>> 8889<%2B91%20172%20424%208889>|    UK:
>> +44 2070 99 49 55|US: +1 480 304 3080 <%2B1%20480%20304%203080>
>>  [image: ONE BCG] <http://www.onebcg.com>
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise private information. If you have
>> received it in error, please notify the sender immediately and delete the
>> original. Any other use of the email by you is prohibited.
>> Please consider the environment before printing this email
>>
>>
>>
>> On 5/17/2011 4:04 PM, nekresh wrote:
>>
>>  On Tue, May 17, 2011 at 12:03 PM, harmeets  
>>  wrote:
>>
>>  Hi what will be exe and args here?
>>
>>
>> With your command : /bin/cp -rp
>> /usr/local/lib/xsp/test/2.0/projectname/invoices/
>> /usr/local/lib/xsp/test/2.0/projectname/testupload/
>>
>> The exe part will be "/bin/cp"
>> and the args part will be "-rp
>> /usr/local/lib/xsp/test/2.0/projectname/invoices/
>> /usr/local/lib/xsp/test/2.0/
>> projectname/testupload/"
>> ___
>> Mono-devel-list mailing list
>> Mono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
> ___
> Mono-devel-list mailing 
> listMono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] excute linux command under mono C#

2011-05-18 Thread nekresh
Standard non-error exit code on linux is 0
If you get something else then an error as occured.

Are you sure that both path exists ?
Do you have read/write rights ?

On Wed, May 18, 2011 at 10:22 AM, harmeet.si...@onebcg.com <
harmeet.si...@onebcg.com> wrote:

>  Hi
>
> I tried the code. My code is
>
> protected void Button1_Click(object sender, EventArgs e)
> {
> Label1.Text=Execute("/bin/cp"," -rp
> /usr/local/lib/xsp/test/2.0/projectname/invoices/
> /usr/local/lib/xsp/test/2.0/projectname/testupload/").ToString();
>
> }
> internal int Execute(string exe, string args)
> {
> ProcessStartInfo oInfo = new ProcessStartInfo(exe, args);
> oInfo.UseShellExecute = false;
> oInfo.CreateNoWindow = true;
>
> oInfo.RedirectStandardOutput = true;
> oInfo.RedirectStandardError = true;
>
>
>
> Process proc = System.Diagnostics.Process.Start(oInfo);
> proc.WaitForExit();
> int exitCode = proc.ExitCode;
> proc.Close();
>
> return exitCode;
> }
>
>
> Output returned is 1. But Files are not copied to destination folder. Any
> suggestions.
>
>   Regards,
>
> Harmeet Singh
> Software Engineer .NET
> Ext: 3023
>
>  Phone AU: +61 2 9114 6001|IN: +91 172 424 |UK: +44
> 2070 99 88 50|US: +1 866 420 9555
>  FaxAU: +61 2 9114 6002|IN: +91 172 424 8889|UK: +44 2070
> 99 49 55|US: +1 480 304 3080
>  [image: ONE BCG] <http://www.onebcg.com>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
> Please consider the environment before printing this email
>
>
>
> On 5/17/2011 4:04 PM, nekresh wrote:
>
> On Tue, May 17, 2011 at 12:03 PM, harmeets  
>  wrote:
>
>  Hi what will be exe and args here?
>
>
> With your command : /bin/cp -rp
> /usr/local/lib/xsp/test/2.0/projectname/invoices/
> /usr/local/lib/xsp/test/2.0/projectname/testupload/
>
> The exe part will be "/bin/cp"
> and the args part will be "-rp
> /usr/local/lib/xsp/test/2.0/projectname/invoices/
> /usr/local/lib/xsp/test/2.0/
> projectname/testupload/"
> ___
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] excute linux command under mono C#

2011-05-17 Thread nekresh
On Tue, May 17, 2011 at 12:03 PM, harmeets  wrote:
> Hi what will be exe and args here?

With your command : /bin/cp -rp
/usr/local/lib/xsp/test/2.0/projectname/invoices/
/usr/local/lib/xsp/test/2.0/projectname/testupload/

The exe part will be "/bin/cp"
and the args part will be "-rp
/usr/local/lib/xsp/test/2.0/projectname/invoices/
/usr/local/lib/xsp/test/2.0/projectname/testupload/"
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] StackOverflow on System.Delegate.Equals

2011-04-04 Thread nekresh
On Mon, Apr 4, 2011 at 10:37 PM,   wrote:
> On Mon, 2011-04-04 22:03:47 Gonzalo Paniagua Javier  
> wrote:
>> On Mon, 2011-04-04 at 20:48 +0100, Alan wrote:
>> > Aren't event handler methods emitted with a [synchronized] attribute
>> > by default which would prevent this issue? You can check by
>> > disassembling the IL and seeing if its there.
>>
>> They are synchronized as long as you don't replace the default
>> add/remove with your own code.
>
> AFAIK you cannot inherit from the Delegate/MulticastDelegate class. So how 
> can I replace the default add/remove code? Anyway I'm almost sure that case 
> has no place in my code but I have to take a look on 3rd part libraries.  
> Thanks in advance for any help.
>
> Best regards,
> Marcin

public event MyType MyEvent {
  add { }
  remove { }
}
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Developing Mono Applications for Multi Platforms?

2011-03-25 Thread nekresh
On Thu, Mar 24, 2011 at 10:21 PM, RandomlyKnighted  wrote:
>  Hey everyone, so this is my first Mono application and I'm trying to make it
> for Windows, Linux, and Mac OS X. Currently I have my GTK# project and I
> have an empty C# class file. I'm just wanting for someone to point me in the
> right direction. Using this empty class file I would like to have my program
> detect what operating system is running. Then I am going to call this class
> file from my main class and use a select statement to have it do certain
> things depending on which operating system is running.
>
> I just need help figuring out how to detect the operating systems. Can
> someone point me in the right direction?

Have a look at http://www.mono-project.com/FAQ:_Technical, on the "How
to detect the execution platform ?" question.

In short, use the Environment.OSVersion.Platform enum.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-06 Thread nekresh
On Wed, Jan 5, 2011 at 8:04 PM, mike  wrote:
>
> Not sure what you mean.  Actually, I was just refreshing the thread.  ;-)
>
> See previous post and example code, "If I p/Invoke to a single native
> dll, all is fine. However if that dll depends on a secondary native dll, I
> get an "unhandled exception: System.DLLNotFoundException". Again, this
> scenario works fine under .NET, fails under 2.8 (under win mono)
>
> The issue seems to be related to p/Invoking a dynamic link library which
> depends on a second native dll.
>

Have you checked your LD_LIBRARY_PATH environment variable ?
In order to find a native library in the current folder, the
LD_LIBRARY_PATH must contain . or the full path to your application's
folder.
This vary from windows which is searching in the application's base
folder first (see Remarks in
http://msdn.microsoft.com/en-us/library/ms684175(v=vs.85).aspx)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list