Cyberiafreak

"Fortunate are those who take the first steps.” ― Paulo Coelho

Pizza as a Service [IaaS vs PaaS vs SaaS]

I’ve just come across the below Pizza as a Service chart from linkedin. I just added our Azure chart as well below for side by side comparison. I should give full credit to “Albert Barron” who created this pizza chart and article here. Very layman explanation for Cloud service.. Fantastic.

a

aa

February 26, 2015 Posted by | Azure | | Leave a comment

Getting started with Azure RemoteApp

This weekend, I had a chance to explore Azure RemoteApp. In nutshell, this App runs on Windows 2012 R2 over rdp service. We usually RDP to a remote machine but in this case, we are rdp’ing to a particular published apps without any visible difference like window border or floating bar etc. Trust me, end user won’t be able to identify whether they are on a remote app or local app. I am really impressed with the design thought.

We can connect to a remotely published apps from a azure portal and then use it by installaing a small exe at client machine for logon and app selection. As of now, It comes with few default Office applications(apps) but in case of hybrid option you can customize by uploading your VHD’s as per our wish.

Since this supports resume and continue kind of state management, you could logoff from your office and then continue from home using any device from the place where you’ve left.

+ It delivers the functionality of the on-premises Microsoft RemoteApp, backed by Remote Desktop Services

+ Helps you provide secure, remote access to applications from many different user devices. Available for Windows 8.1, Windows 8, Windows 7 Service Pack 1, iOS, Mac OS X, Windows RT, Android, devices, and Windows Phone. It also support the Windows 10 preview.

> To achieve this, you need to install a clickonce installable RemoteAppClient from here – https://www.remoteapp.windowsazure.com/ClientDownload/Windows.aspx

> Azure documentation: http://azure.microsoft.com/en-us/documentation/services/remoteapp/

> Video – http://azure.microsoft.com/en-us/documentation/videos/azure-remoteapp-hybrid-deployment-overview/

> Azure RemoteApp Cloud Deployment overview

http://azure.microsoft.com/en-us/documentation/videos/azure-remoteapp-cloud-deployment-overview/

> Understanding Azure Remote App

http://channel9.msdn.com/Shows/Edge/Azure-Remote-App-Intro-With-Eric-Orman

This slideshow requires JavaScript.

February 16, 2015 Posted by | Azure | | Leave a comment

Interesting Azure links

Microsoft Azure infographics
http://azure.microsoft.com/en-us/documentation/infographics/

Microsoft Architecture Blueprints
https://msdn.microsoft.com/dn630664#fbid=rVymR_3WSRo

Top architecture trends and perspectives
https://msdn.microsoft.com/en-us/dn800997

Cloud application development
https://msdn.microsoft.com/cloud-app-development-msdn

Azure Symbol/Icon set
http://azure.microsoft.com/en-us/documentation/articles/architecture-overview/#azure-symbolicon-set .

Design patterns
http://azure.microsoft.com/en-us/documentation/articles/architecture-overview/#design-patterns 

February 8, 2015 Posted by | Azure | Leave a comment

Microsoft Azure ebooks download(free from MVA)

Azure-HDInsight-coverBuilding_Cloud_Apps_with_Microsoft_AzureFundamentals_of_Azure_107x130MVA-Intro-Win-AzureMVA-Rethinking-Enterprise

Download@ http://www.microsoftvirtualacademy.com/ebooks#azure

February 4, 2015 Posted by | Azure | | Leave a comment

About -Azure Storage Explorer utility

I got this tools link while searching for Azure Storage free tools – explorer. Azure Storage Explorer is simply a nice tool to work and explore. It is free, elegant and clutter free to use. It just fulfill our expectation. #Good job by david

Download it from here – http://azurestorageexplorer.codeplex.com/

This slideshow requires JavaScript.

February 2, 2015 Posted by | Azure, Azure Storage | | Leave a comment

Error while deleting Azure storage, how to safe delete

While working with Azure storage, I ran into a tricky problem where I could not able to delete the storage created implicitly during VM creation.

Though I deleted all my VM’s from my account but these underlying storage were listed under my account for some reason. I tried hard to get rid of this by going through all the dependencies but no luck.

ee

I tried deleting using Azure Storage Explorer but same problem persisted.

de

Resolution: You have to delete VHD files before deleting storage. When Virtual Machine is removed, VHD file exists there for some reason – may be by design think so. You can delete it from Virtual Machines -> Disks and then try deleting the storage.

errr

February 2, 2015 Posted by | Azure | | Leave a comment

Windows Azure storage getting started

My reading notes from this book which I bought recently – Developing Cloud Applications with Windows Azure Storage by Paul Mehner.

th

I will try simplify the content with examples for quicker references. Hope you enjoy this series about Windows Azure Storage.

+ Windows Azure Storage(WAS) – provides independent data management services to our application – data storage for any application/any platform/any language over HTTP

+  We are moving to NoSQL era due to volume of data/performance. In 1970’s we started with flat file –> file based relational db’s -> Relational -> Hierarchical -> N/w -> Federated -> NoSQL (not only SQL).

+ WAS is implements as NoSQL-styled db.

+ There are 3 high level data types in WAS – Blob, Tables and Queues.

+ WAS is not a relational db

+ Access to this WAS is done with simple REST API

+ WAS supports scalability, replication, geo-locaiton, geo-replication, independent and interoperability, maintains fully consistent model (Amazon S3 is eventually consitent model – read operation after update may/may not return the very recent updated data)

BLOBS (for storing unstructured data –  doc, pictures, videos and music)

=======

>  Windows Azure blob service provides a simple RESTful APi for storing and retrieving unstructured data.

> Blobs are organized into Containers(similar to directories), you can have any number of blob’s under containers.

> Blobs and blob containers are easily accessible with unique url’s.

> You can set public access as well.

> Ideal for the storage of web content

Tables

=====

> Windows Azure Table service  provides a simple RESTful Api for storing massive amounts of semi structured data.

> These tables are not at all like relational db tables.

> Rows are called entities, consist of properties, which are like columns.

> Different rows stored in the same table can often have different set of properties.

Queue

=====

> Queues do not provide permanent storage of the message they handle.

> Unprocessed messages will be deleted from the queue after 7 days.

> Same like MSMQ, it will get deleted upon read, exposed through RESTful API’s.

Happy Azuring!

February 2, 2015 Posted by | Azure Storage | | Leave a comment

Microsoft Azure – Website hosting options explored..

Microsoft Azure is growing faster than ever. Being developer for all these years, I have not considered Azure is for Developer. Trust me, you will be bowled after seeing whole list of Azure offerings.
In future, there is no surprise that every developer would be touching atleast one of their offerings at some point in their dev time. If you are Microsoft. NET dev, then there is high chance that you would be asked to consider Azure offerings in your proposal/delivery. This year I am going to concentrate on Microsoft Azure and its bread crumb of technologies from Developer perspective.

Let start with simple web applications hosting, today you can do it in 3 ways using Azure services.

1) Using Azure VM – host under dedicated IIS(VM) – PaaS
> on par with your on-Premises deployments
> you own the VM(your box), so you need to take care of OS updates
> you manage the hostnames inside IIS (setup the host header within IIS)
> pretty much you can install/manage as like your on-premise edition
2) Using Cloud Services- host using Web Role(WR) -IaaS
> you own only a web-role, could service save us from OS updates and other headaches.
> You own the application, you could RDP’s to this VM and perform as you do in your on-premise
> one thing to remember – these are stateless VM. Every start and stop you get a different VM
> you own the code and your application updates – rest is taken care by MS.
> well suited for multitier application – can be scaled independetly (web and work roles)
3) Host it as Azure Website(AWs)
> easiest way to host the websites
> don’t have to worry about OS updates
> all your application updates are pushed through your tfs/dropbox.
> one click swap to production vs staging slots and other cool features
> web jobs adds processing power to our websites by adding worker role to your existing cloud services
> well suited for hosting sites like – wordpress, joomla, drupal- .NET, Java, PHP, Node.js, Python
> built-in Autoscale and load balancing
> high availability and auto-patching
> continous deployment with Git, TFS, GitHub
> SQL Db, Mysql, DocumentDB, Search, MongoDB

Let me start explore from db side in our next post :)

February 1, 2015 Posted by | Azure | , | Leave a comment

My 500′ th blog post from the past 10 years of blogging !! – Awesome

Year 2014 is something unforgettable in my career and personal life.
Yes, I moved to a newer job, second daughter “Mahanya” arrived, got leaner, becoming vegan, enjoying being single, enjoy preparing fish. I enjoy kesar sunday tea and jilabi’s – one of my weekend stress buster. Coming back, I don’t usually think about the past(reviewing year) and also not good at that. But wanted to have a checkpoint in life to see from the huge list of things I succeeded and failed in 2014. Life is too fast and most of us don’t have time to relax and look back.

Few important things I learned during this first 10 year of my career. 

1) Be focused and persistent from the day one.
2) Stay Focused on what matters the most and leave the rest.
3) Nothing wrong in Jack of all than master of one – you should aware of your battle card and ignore your peers good at it.
4) My hobbies changed every year, thinking changed – really slowing down. I can feel that.
5) Becoming techie :) I have not changed a bit from my college days..
6) Penny saved is penny earned
7) Focus on only on things which you can change and influence.
8) Thanks to Sapient and Thomson for shaping my financial knowledge. Oh yeah – I can be your trusted advisor too
9) Not lucky enough to use my passport, had always mixed feeling – but right now I am not worried a bit.
10) Anti TV and still going on..

What I learned in 2014
1) “Persistence”, “Confident” and “focus” – “NEVER GIVE UP”
2) 2014 absolutely no travel and less fun, more work and no family life
3) Got Leaner – trimmed those extra those 5 Kg
4) Feedemon is my constant weekend buster to find a good reading stuff.- thanks for that.
5) Plan for the day ahead. These days, my calendar drives my work and schedules
6) Commute to work by Office cab, timing changed to NA hours(EST)
7) Particpiated in Office Hackathon – attempted “Search and paste”
8) Set the right expectation, say “no” at the right place
9) You know what, my 2014 hobbie is listening music – Bose at home.
10) Learned some internals of Microsoft Stack technologies and debugging tools.

Failures
> Machine learning dumped it
> Failed at one of the internal key movement
> No certification/coursera
> Closed Metroskillz training business
> No rain and zero business- driest year so far I have seen

I am excited about 2015- absolutely looking forward to do some cool things in both personal and career.
1) Azure, Azure and Azure – develop these skills required for consulting & Develop some cool free office apps
2) Stay always focused and explore the connecting dots
3) Plan for at least 2 vacation with family
4) MS certification
5) Hard work never fails
6) Buy a cycle

For me, 2014 was a great year. I have really enjoyed blogging for the last ten years by exploring things which is interesting to me always. I am not going to give up.. I am sure you too..

# good luck mikky ! best wishes ! lot of sleepless night and hard work will pay you some day. ## Keep going – I am proud of your energy even after 16 hours+ of sitting..### You are different, doer !!

Cyberiafreak – MS 10.33 AM…Life is beautiful.. Trust it. …hackoo :) exiting..

December 23, 2014 Posted by | Uncategorized | Leave a comment

Languages features in C# 6 and VB 14

https://roslyn.codeplex.com/wikipage?title=Language%20feature%20status

Feature Example C# VB
Auto-property initializers public int X { get; set; } = x; Added Exists
Getter-only auto-properties public int Y { get; } = y; Added Added
Ctor assignment to getter-only autoprops Y = 15 Added Added
Parameterless struct ctors Structure S : Sub New() : End Sub : End Structure Added Added
Using static members using System.Console; … Write(4); Added Exists
Dictionary initializer new JObject { [“x”] = 3, [“y”] = 7 } Added No
Await in catch/finally try … catch { await … } finally { await … } Added No
Exception filters catch(E e) if (e.Count > 5) { … } Added Exists
Partial modules Partial Module M1 N/A Added
Partial interfaces Partial Interface I1 Exists Added
Multiline string literals “Hello<newline>World” Exists Added
Year-first date literals Dim d = #2014-04-03# N/A Added
Line continuation comments Dim addrs = From c in Customers ‘ comment N/A Added
TypeOf IsNot If TypeOf x IsNot Customer Then … N/A Added
Expression-bodied members public double Dist => Sqrt(X * X + Y * Y); Added No
Null propagation customer?.Orders?[5]?.$price Added Added
String interpolation $”{p.First} {p.Last} is {p.Age} years old.” Added* Planned
nameof operator string s = nameof(Console.Write); Added* Planned
#pragma #Disable Warning BC40008 Added Added
Smart name resolution N/A Added
ReadWrite props can implement ReadOnly Exists Added
#region inside methods Exists Added
Overloads inferred from Overrides N/A Added
CObj in attributes Exists Added
CRef and parameter name Exists Added
Extension Add in collection initializers Added Exists
Improved overload resolution Added N/A

December 13, 2014 Posted by | Uncategorized | , | Leave a comment

Troubleshooting masterpiece by Mark Russinovich – Weekend Read. (from TechEd NA-2014)

It is always funny, geeky, informative and casual when listening to Mark Russinovich Tech-ed session. It made my weekend :)

Be sure to watch this – especially blue screen one. http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/WIN-B354#fbid=

Mark Russinovich.jpg

December 8, 2014 Posted by | .NET General, 100 % Fun...[really Worth] | | Leave a comment

How to create your first Office Com Addin

1) Create a C# class library project

2) Add Extensibility reference to the project
 namespace ClassLibrary1
 {
 public class Class1 : Extensibility.IDTExtensibility2

3) Implement the interface method and place a messagebox OnStartupComplete to test
4) From Project properties > Build > "Register for COM interop"
5) From Project properties > Application > Assembly information > "Make assembly COM Visible
6) Compile - VS should automatically build and register the COM to the registry
7) This would create something like this,
 Windows Registry Editor Version 5.00
   [HKEY_CLASSES_ROOT\ClassLibrary1.Class1\CLSID]
 @="{0D39F056-DF63-3860-9E79-B57F6358FD4D}"
8) Now, create the below registry file "a.reg" save and run to create this entry under HCU
For Excel, create under Excel and accordingly for other product
 Windows Registry Editor Version 5.00
 [HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\ClassLibrary1.Class1]
 "LoadBehavior"=dword:00000003
Copy "{0D39F056-DF63-3860-9E79-B57F6358FD4D}" and search under HKEY_CLASS_ROOT\CLSID
Windows Registry Editor Version 5.00
 [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}]
 @="ClassLibrary1.Class1"
 [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\Implemented Categories]
 [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\InprocServer32] @="mscoree.dll"
 "ThreadingModel"="Both"
 "Class"="ClassLibrary1.Class1"
 "Assembly"="ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
 "RuntimeVersion"="v4.0.30319"
 "CodeBase"="file:///c:/users/maheshk/documents/visual studio 2013/Projects/ClassLibrary1/ClassLibrary1/bin/Debug/ClassLibrary1.dll"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\InprocServer32\1.0.0.0]
 "Class"="ClassLibrary1.Class1"
 "Assembly"="ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
 "RuntimeVersion"="v4.0.30319"
 "CodeBase"="file:///c:/users/maheshk/documents/visual studio 2013/Projects/ClassLibrary1/ClassLibrary1/bin/Debug/ClassLibrary1.dll"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\ProgId]
@="ClassLibrary1.Class1"
9) Now launch, Excel should see the message box on load - means this add-in loaded because of load behavior set as "3" - load at start. ( at the step #8 )

10)You can check this, by Excel > File > Options > Addins > Active Application Addin: ClassLibrary1.Class, location: mscoree.dll, COM Add-in

11) Register: 
"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase ComAddin\bin\Debug\ComAddin.dll
"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /unregister ComAddin\bin\Debug\ComAddin.dll

Note: You may get access denied if you did not run as VS in Admin mode. 

Refer - http://support.microsoft.com/kb/302901
Download my sample - http://1drv.ms/1GzJP1N 
Download C++ sample - http://1drv.ms/1GzK4tH

November 8, 2014 Posted by | .NET General, Office, Outlook | , | Leave a comment

How to capture the dumps when the application crash on launching ?

Two ways you can achieve this,

#1) Using Procdump

>procdump.exe -w -e -ma SomeCrashingApp.exe
[This command used to wait for the exe to appear, crash to gather the dumps ]

If you are capturing .NET 4.0 dump, then this won’t triggered, you may have to specify -e 1 to gather the dump for later framework.
>procdump.exe -w -e 1 -ma somecrashing.exe
If it is older version of .NET then you could use this.
>procdump.exe -w -e -ma somecrashing.exe

#2) Using DebugDiag

1 2 3 4

October 28, 2014 Posted by | .NET General | Leave a comment

About DDEInitialize and sometime lockup scenario explained.

I had a chance to work with Excel DDE call lockup Issue,

> The first step in establishing a DDE conversation is that the DDE client will send a WM_DDE_INITIATE message to one or more windows running on the same desktop as the DDE client process. The WM_DDE_INITIATE message is a query to each window receiving the message to determine whether the process that owns the window supports the specified application name and topic. Typically, a DDE client will broadcast the WM_DDE_INITIATE message to all top level windows (both visible and hidden) running on the same desktop, looking for any running process that supports the specified application name and topic.

The implementation of the Excel DDEInitiate function broadcasts the WM_DDE_INITIATE message by calling the SendMessage function, specifying HWND_BROADCAST. The SendMessage call will not return until each top level window has processed the WM_DDE_INITIATE message. The hang that occurs when calling DDEInitiate is the result of one or more threads that own a top level not having an active message pump.

The ListBlockedWindow tool helps to identify each process that contains  threads that do not have an active message pump and own one or more top level windows. The applications identified by the ListBlockedWindow tool should be updated such that each thread that owns a window has an active message pump, even when a given thread owns windows that are not visible. The term “message pump” (or message loop) refers to the calls a thread makes to the GetMessage or PeekMessage functions to retrieve/process any pending window messages for windows owned by the thread. A thread that owns a window receiving a WM_DDE_INITIATE message and does not actively call GetMessage or PeekMessage will cause the thread that is sending the WM_DDE_INITIATE message with SendMessage to block until the message is processed.

Please refer to the following links for additional information about DDE and message processing in Windows.

About Dynamic Data Exchange – http://msdn.microsoft.com/en-us/library/windows/desktop/ms648774(v=vs.85).aspx

Using Messages and Message Queues – http://msdn.microsoft.com/en-us/library/windows/desktop/ms644928(v=vs.85).aspx

SendMessage function – http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx

Note: this content is not mine, borrowed from my colleague-DaveAnd

October 25, 2014 Posted by | .NET General, Office | Leave a comment

Fix: Open XML SDK hang in multithreaded environments

Just come to know through my colleague about this fix- wanted to share.
We finally have a fix for this long standing issue where applications using Open XML SDK (or System.IO.Packaging) would hang in multithreaded scenarios while working with large files.(10MB limit related bug).

Hotfix rollup 2996566 for the .NET Framework 4.5, 4.5.1, and 4.5.2 on Windows 8.1 and Windows Server 2012 R2
http://support.microsoft.com/kb/2996566
Hotfix rollup 2996567 for the .NET Framework 4.5, 4.5.1, and 4.5.2 on Windows 8 and Windows Server 2012
http://support.microsoft.com/kb/2996567
Hotfix rollup 2996568 for the .NET Framework 4.5, 4.5.1, and 4.5.2 on Vista SP2, Windows Server 2008 SP2, Windows 7 SP1, and Windows Server 2008 R2 SP1
http://support.microsoft.com/kb/2996568

src: Internal email

October 21, 2014 Posted by | Uncategorized | Leave a comment

Connect(); — Join this exciting virtual event for developers!

 

 

 

 

 

 

Connect(); is a cloud-first, mobile-first, code-first virtual event focused on current and future Microsoft technologies for developers. Build on your current skills, unleash your creativity, and expand what’s possible to deliver unprecedented innovations.

Want to ask and interact with Scott Guthrie, S. “Soma” Somasegar, Brian Harry, and Scott Hanselman & watch 40+ondemand vidoes?  http://www.visualstudio.com/connect-event-vs  

October 19, 2014 Posted by | .NET General | | Leave a comment

Convert PPT to SVG – workaround/hack !

One of my colleague wanted to know if there is any support from MS to convert the PPT’s to SVG without going through 3’rd party lib’s. I got an idea and jumped into connect the two different PIA’s to hack around. At the end, I am able to get it what he wanted. Good hacking :) – here is the poc of my sample tested roughly few times. You may have to fine tune or test thoroughly before moving to production.

Objective: PPT => SVG
Proposed idea: PPT (PIA) =>jpg => VISIO (PIA) => SVG.

  1. Create/open a PPT using Office.Interop.PowerPoint
  2. Save the PPT as Jpeg.
  3. Close the PPT
  1. Load a blank VISIO file using Office.Interop.Visio
  2. Import those exported Jpeg –from step2
  3. Export the document as SVG.

======================================
Here is the c# code.

using Office = Microsoft.Office.Core;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using Visio = Microsoft.Office.Interop.Visio;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
CreatePowerPointUsingPIA();
CreateSVGfromJpegUsingVisio();

GC.Collect();
GC.WaitForPendingFinalizers();

GC.Collect();
GC.WaitForPendingFinalizers();

Console.Write(“Done.. Press any key to close”);
Console.ReadLine();
}
private static void CreatePowerPointUsingPIA()
{
try
{
PowerPoint.Application oPowerPoint = new PowerPoint.Application();

// By default PowerPoint is invisible, till you make it visible:
//oPowerPoint.Visible = Office.MsoTriState.msoFalse;

PowerPoint.Presentation oPre = oPowerPoint.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoTrue);

PowerPoint.Slide oSlide = oPre.Slides.Add(1,PowerPoint.PpSlideLayout.ppLayoutText);
oSlide.Shapes[1].TextFrame.TextRange.Text = “WELCOME : Win an Xbox One with Machine Learning!”;

oSlide = oPre.Slides.Add(2, PowerPoint.PpSlideLayout.ppLayoutText);
oSlide.Shapes[1].TextFrame.TextRange.Text = @”Conclusion: Thank you”;

string fileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + “\\SourcePPoint.pptx”;
oPre.SaveAs(fileName,PowerPoint.PpSaveAsFileType.ppSaveAsJPG,
Office.MsoTriState.msoTriStateMixed);

oPre.Close();
oPowerPoint.Quit();
}
catch (Exception ex)
{
Console.WriteLine(“PowerPoint throws the error: {0}”, ex.Message);
}
}
private static void CreateSVGfromJpegUsingVisio()
{
Visio.Application app = null;
Visio.Documents oDocs = null;
Visio.Document oDoc = null;

try
{
app = new Visio.Application();
app.Visible = false;

// Create an existing blank saved vsdx – dummy
string dummyInput = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + “\\Drawing1.vsdx”;

oDoc = app.Documents.Open(dummyInput);

//int DiagramServices = 0;
//DiagramServices = app.ActiveDocument.DiagramServicesEnabled;

string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string[] filePaths = Directory.GetFiles(path + @”\SourcePPoint”, “*.jpg”);

int sliceCount = 1;

foreach (string str in filePaths)
{
app.ActiveWindow.Page.Import(str);
app.Settings.SVGExportFormat = Visio.VisSVGExportFormat.visSVGExcludeVisioElements;
app.ActiveWindow.Selection.DeselectAll();
app.ActiveWindow.SelectAll();
app.ActiveWindow.Selection.Export(path + sliceCount + “.svg”);
sliceCount++;
}
oDoc.Saved = true;
oDoc.Close();
app.Quit();
}
catch (Exception ex)
{
Console.WriteLine(“CreateSVGfromJpegUsingVisio throws the error: {0}”, ex.Message);
}
}
}
}
Let me know if this helps you or any correction required.

October 14, 2014 Posted by | Uncategorized | Leave a comment

Follow

Get every new post delivered to your Inbox.